The Stanford Daily Custom REST API Documentation - TheStanfordDaily/stanforddaily-wordpress GitHub Wiki
The Stanford Daily Authors Plugin
Get Authors List
Returns a list of authors (author ID, name, and profile image) in each section (e.g., "News", "Opinions").
- URL:
/authors - Method:
GET - URL Params: None
- Data Params: None
- Example: https://www.stanforddaily.com/wp-json/tsd/v1/authors
Get Author Info
Returns an author's information including author ID, name, email, cover image, funny image, profile image, blurb, hometown, time at daily, tap order, dining hall, study spot, find you, section.
- URL:
/authors/:id - Method:
GET - URL Params:
id=[integer] - Data Params: None
- Example: https://www.stanforddaily.com/wp-json/tsd/v1/authors/1001827
The Stanford Daily - Locations
Get / search Locations List
Returns a list of locations (ID, name, aliases, description, coordinates, tag slug, number of articles).
- URL:
/locations - Method:
GET - URL Params:
[none]: Returns all places?q={text}: Returns a list of locations relevant to the searched words.?lat={lat}&long={long}&radius={radius}: Returns a list of locations within the input radius (in miles) of the input coordinates.
- Data Params: None
- Example:
Get Location Info & Posts
Returns information related to a location.
These information include:
type=[none]: Information of this location.type=posts: All posts related to this location. (page=[integer])
-
URL:
/locations/:id/:type -
Method:
GET -
URL Params:
Required:
id=[integer](a location's ID)
Optional:
[none]: Return information about this location.type=posts: Return all posts related to this location (withpage=[integer]).
-
Data Params: None
-
Example:
The Stanford Daily Push Notification Plugin
See https://github.com/TheStanfordDaily/tsd-push-notification/wiki/REST-API.