From Meta, a Wikimedia project coordination wiki
Types
- primitives
- 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
- activity.type
- enum(private, challenge, popup, timelimit)
- activity.category
- activity.unit
- 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
- user_relation.type
- enum(friend, friend_request, follower)
Interface
- add-activity-progress
- input activity: int, progress: [progress: int, latitude: float, longitude: float, altitude: float]
- output participants: [user: int, nickname: string, points: int, progress: int, progress_timestamp: date]
- add-activity
- input activity: [title: string, timestamp: date, type: activity.type, category: activity.category, goal: int, unit: string], add_participants: [int]?
- output activity: {a single instance of the output of get-activities}
- add-post
- input post: [parent: int, content: string, type: post.type, access: string], user: int, add_uploads: [int], add_users: [int]
- output post: {a single instance of the output of get-posts}
- add-upload
- input image | video
- output upload: {a single instance of the output of get-uploads}
- add-user-device
- input device_token: string
- add-user-post-relation
- input post: int, type: user_post_relation.type
- add-user-relation
- input user: int, type: user_relation.type
- add-user
- input user: [first_name: string, last_name: string, birthdate: date, gender: string, email: string, password: string, nickname: string]
- check-chat-messages
- input chat: int, until: int
- check-notification
- delete-activity
- delete-post
- delete-user
- edit-activity
- input 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
- input completed: bool?, before | after: date?
- output 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
- input activity: int
- output route: [[progress: int, timestamp: date, latitude: float, longitude: float, altitude: float]]
- get-friends
- input user: int
- output friends: {see output of get-users}
- get-notifications
- input before | after: int?
- output notifications: [[id: int, type: notification.type, object: any?, timestamp: date, checked: bool]]
- get-points
- input type: enum(day, week, month, summary), before | after: date?
- if type in (day, week, month):
- output points: [[date_range_start: date, date_range_end: date, points: int]]
- else if type = summary
- output points: week_done: int, week_total: int, month_done: int, month_total: int, level_done: int, level_total: int
- get-post-uploads
- input post: int | enum(uncategorized-uploads), before: int?, after: int?
- output uploads: [[id: int, type: upload.type, title: string, width: int, height: int]]
- get-posts
- get-profile-picture
- input user: int
- output image
- get-upload
- input id: int
- output image | video
- get-user
- input user: int
- output [user: int, nickname: string, points: int, relations: [enum(friend_request_sent, friend_request_received, friend, follower)]]
- get-users
- input search: string?
- output users: [[user: int, nickname: string, points: int]]
- join-activity
- leave-activity
- leave-post
- login
- input email: string, password: string
- output 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
- input device_token: string
- remove-user-post-relation
- input post: int, type: user_post_relation.type
- remove-user-relation
- input user: int, type: user_relation.type
- set-user-settings
- input 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?]