API: Difference between revisions

From Meta, a Wikimedia project coordination wiki
Content deleted Content added
No edit summary
Revert to the revision prior to revision 22874674 dated 2022-02-22 05:23:35 by Ogmommy3 using popups
Tag: Manual revert
 
(4 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{MovedToMediaWiki|API}}
== Types ==
* primitives
** int, float, string
* date
** string representation of a date with format ''yyyy-mm-dd'' and optional time ''hh:mm:ss''
* image
** image of type png, jpg, gif or bmp
* video
** video of type mp4
* activity.type
** enum(private, challenge, popup, timelimit)
* activity.category
** enum(run, bike)
* activity.unit
** enum(meters, seconds)
* notification.type
** enum(friend_request, friend_confirmation, new_pb_post, new_comment, activity_invitation, activity_update, activity_removal)
* post.type
** enum(pinboard, pb_status, pb_activity, comment, chat, chat-message, album)
* upload.type
** enum of allowed types for (image | video)
* user_post_relation.type
** enum(access, like)
* user_relation.type
** enum(friend, friend_request, follower)


Moved preserving full histories. '''[[User:Robchurch|robchurch]]''' | [[User_talk:Robchurch|talk]] 07:09, 14 May 2007 (UTC)
== Interface ==
* add-activity-progress
** <u>input</u> activity: int, progress: [progress: int, latitude: float, longitude: float, altitude: float]
** <u>output</u> participants: [user: int, nickname: string, points: int, progress: int, progress_timestamp: date]
* add-activity
** <u>input</u> activity: [title: string, timestamp: date, type: activity.type, category: activity.category, goal: int, unit: string], add_participants: [int]?
** <u>output</u> activity: {a single instance of the output of get-activities}
* add-post
** <u>input</u> post: [parent: int, content: string, type: post.type, access: string], user: int, add_uploads: [int], add_users: [int]
** <u>output</u> post: {a single instance of the output of get-posts}
* add-upload
** <u>input</u> image | video
** <u>output</u> upload: {a single instance of the output of get-uploads}
* add-user-device
** <u>input</u> device_token: string
* add-user-post-relation
** <u>input</u> post: int, type: user_post_relation.type
* add-user-relation
** <u>input</u> user: int, type: user_relation.type
* add-user
** <u>input</u> user: [first_name: string, last_name: string, birthdate: date, gender: string, email: string, password: string, nickname: string]
* check-chat-messages
** <u>input</u> chat: int, until: int
* check-notification
** <u>input</u> notification: int
* delete-activity
** <u>input</u> activity: int
* delete-post
** <u>input</u> post: int
* delete-user
** <u>input</u> password: string
* edit-activity
** <u>input</u> activity: [id: int, title: string, timestamp: date, category: activity.category, goal: int, unit: activity.unit], remove_participants: [int]?, add_participants: [int]?
* edit-post
* get-activities
** <u>input</u> completed: bool?, before | after: date?
** <u>output</u> activities: [[id: int, user: int, title: string, timestamp: date, type: activity.type, category: activity.category, goal: int, unit: activity.unit, date_updated: date, nickname: string, joined: bool, participants_count: int, participants: [user: int, nickname: string, points: int, progress: int, progress_timestamp: date]]]
* get-activity-route
** <u>input</u> activity: int
** <u>output</u> route: <nowiki>[[progress: int, timestamp: date, latitude: float, longitude: float, altitude: float]]</nowiki>
* get-friends
** <u>input</u> user: int
** <u>output</u> friends: {see output of get-users}
* get-notifications
** <u>input</u> before | after: int?
** <u>output</u> notifications: <nowiki>[[id: int, type: notification.type, object: any?, timestamp: date, checked: bool]]</nowiki>
* get-points
** <u>input</u> type: enum(day, week, month, summary), before | after: date?
** if type in (day, week, month):
*** <u>output</u> points: <nowiki>[[date_range_start: date, date_range_end: date, points: int]]</nowiki>
** else if type = summary
*** <u>output</u> points: week_done: int, week_total: int, month_done: int, month_total: int, level_done: int, level_total: int
* get-post-uploads
** <u>input</u> post: int | enum(uncategorized-uploads), before: int?, after: int?
** <u>output</u> uploads: <nowiki>[[id: int, type: upload.type, title: string, width: int, height: int]]</nowiki>
* get-posts
* get-profile-picture
** <u>input</u> user: int
** <u>output</u> image
* get-upload
** <u>input</u> id: int
** <u>output</u> image | video
* get-user
** <u>input</u> user: int
** <u>output</u> [user: int, nickname: string, points: int, relations: [enum(friend_request_sent, friend_request_received, friend, follower)]]
* get-users
** <u>input</u> search: string?
** <u>output</u> users: <nowiki>[[user: int, nickname: string, points: int]]</nowiki>
* join-activity
** <u>input</u> activity: int
* leave-activity
** <u>input</u> activity: int
* leave-post
** <u>input</u> post: int
* login
** <u>input</u> email: string, password: string
** <u>output</u> user: [user: int, first_name: string, last_name: string, birthdate: date, gender: string, email: string, nickname: string, default_post_access: string], new_notification_count: int, new_chat_message_count: int
* logout
* remove-user-device
** <u>input</u> device_token: string
* remove-user-post-relation
** <u>input</u> post: int, type: user_post_relation.type
* remove-user-relation
** <u>input</u> user: int, type: user_relation.type
* set-user-settings
** <u>input</u> settings: [first_name: string, last_name: string, birthdate: date, gender: string, email: string, new_password: string?, password: string?, nickname: string, default_post_access: string, profile_picture: image?]

Latest revision as of 06:02, 22 February 2022

Moved preserving full histories. robchurch | talk 07:09, 14 May 2007 (UTC)[reply]