functions
|
|
retrieves a list of posts, tags can be provided for specific searches |
|
|
lists the most popular posts of a time range |
|
|
lists the favorite of a given user |
|
|
retrieves post of a given ID |
search_posts
p621.search_posts(limit, tags, page)
retrieves a list of posts, tags can be provided for specific searches
parameters
-
int limit (optional) - number of posts to retrieve, capped at a maximum of 320 posts
-
list[str] tags (optional) - a list of tags to search for
-
int page (optional) - page of the posts to retrieve
returns
list[Post] - list of retrieved posts
list_favorites
p621.list_favorites(user_id)
lists the favorite of a given user
parameters
-
int user_id (optional) - ID of the target user, authorized user will be used if unspecified
returns
list[Post] - list of retrieved posts
list_popular
p621.list_popular(date, scale)
lists the most popular posts of a time range
parameters
-
str date (optional) - date in the format of yyyy-mm-dd
-
str scale (optional) - scale of the time range: day, week or month
returns
list[Post] - list of retrieved posts
get_post
p621.get_post(post_id)
retrieves post of a given ID
parameters
-
int post_id - ID of the post to retrieve
returns
Post - retrieved post