Skip to content
deby edited this page Feb 20, 2017 · 8 revisions

School Idol API - Activities endpoint

Objects

Name Type Example Note
id Int 300494
avatar String "http://www.gravatar.com/avatar/8e731f8661ed8a4549e5445ccffe388a?s=100&d=http%3A%2F%2Fschoolido.lu%2Fstatic%2Fkotori.jpg" Of the user. From gravatar.
account Mini account object To get the full Account object, use expand_account. Much slower.
last_update Date yyyy-MM-dd'T'HH:mm:ss.SSZ "2016-04-25T12:44:54.051Z"
message Localized string "Idolized #132 Nishikino Maki SR in Deck" May contain markdown formatting.
html_message Localized string "<p>Idolized #132 Nishikino Maki SR in Deck</p>" HTML
message_type Message type choices "Idolized a card"
figure Figure object
liked_by null / Array of User objects null To get the full liked_by objects, use the parameter expand_liked_by. Much slower.
total_likes null / Int null To get the total number of likes, use the parameter expand_total_likes. Slower.
liked null / Boolean true To know if the authenticated user liked this activity or not, use the parameter expand_liked. Slower.
website_url URL "http://schoolido.lu/activities/300494/"
Mini account object
Name Type Example
id Int 6767
text String "schoolidolu EN"
website_url URL "http://schoolido.lu/user/deby/#6767"
Figure object
Name Type Example
picture URL "http://i.schoolido.lu/cards/132RoundIdolizedMaki.png"
link URL / null "http://schoolido.lu/cards/132/SR-Nishikino-Maki-August-Pure/"
link_data String or Int / null 132
link_type String "cards"

The figure is expected to be displayed on the right of the activity message and when you click on the image it goes to the link.

The link types can be:

  • "imgur": the link_data is the short name of the image, such as 6oHYT4B.
  • "cards": the link_data is going to be the id of the card.
  • "events": the link_data is going to be the Japanese name of the event.
Choices
  • message type: Added a card, Idolized a card, Rank Up, Ranked in event, Verified, Trivia, Custom

Note regarding likes

It is not possible to like your own activity, but the website visually considers that you already liked all your own activities, even if that's not what's actually in the database.

If you use the authentication and display the activities with likes, we recommend you to have a similar behavior:

  • Always add 1 to total_likes when displaying it (corresponds to the self-like)
  • When displaying an activity owned by the authenticated user, show a disabled liked button that looks like they already liked it and ignore the liked field

Methods

Get the list of activities

GET http://schoolido.lu/api/activities/
Response

Paginated array of Activity object

Optional parameters for filtering
Name Value Note
message_type Message type choices
account Exact value ID of the account. Allow multiple values separated with a comma: 1,2
card Exact value ID of the card (not owned card)
followed_by Exact value Will return the activities of all the players that the player specified in followed_by follows.
  • Ordering by any field is NOT possible.
  • Ordering will always be by last update time, most recent items first.
  • Ordering by random is NOT possible.
  • Learn more about ordering
Optional parameters to get more data
Name Note
expand_account Will return the full Account objects in the account field. Much slower.
expand_liked_by Will return an array of User objects in the liked_by field. Much much slower.
expand_preferences When expand_liked_by is specified, will return the full Preferences objects in the preferences field in the liked_by User objectss. Much slower.
expand_total_likes Will return the an int that corresponds to the total number of players who liked this activity. Slower.
expand_liked Will return a boolean that tells you whether or not the authenticated user liked this activity. Slower.

Get an activity by id

GET http://schoolido.lu/api/activities/{id}/
Response

Activity object

Parameters

See Get the list of activities.

Authenticated methods

See also: Authentication

Post an activity

POST http://schoolido.lu/api/activities/
Response

Activity object

POST parameters
Name Value Note Default value
account Exact value id of the account Required
message Exact value content of the activity, can be formatted using Markdown Required
imgur_image Exact value URL of an Imgur image null

Edit an activity

PATCH http://schoolido.lu/api/activities/{id}/
Response

Activity object

POST parameters
Name Value Note
message Exact value content of the activity, can be formatted using Markdown
imgur_image Exact value URL of an Imgur image
  • message is only editable on activities which message_type is Custom.

Delete an activity

DELETE http://schoolido.lu/api/activities/{id}/
Response

204 NO CONTENT with an empty body.

Parameters

No parameter.

Like an activity

POST http://schoolido.lu/api/activities/{id}/like/
Response
{"like": "liked"}

If the activity has already been liked, it will not do anything but still return the same response.

Parameters

No parameter.

Unlike an activity

DELETE http://schoolido.lu/api/activities/{id}/like/
Response
{"like": "unliked"}

If the activity has not been liked, it will not do anything but still return the same response.

Parameters

No parameter.

school idol tomodachi

List of features

School Idol Tomodachi Cards

School Idol Tomodachi Profile

School Idol Tomodachi Activities

School Idol Tomodachi Events

School Idol Festival, the game

Help us!

Developers

Clone this wiki locally