Skip to content

Instantly share code, notes, and snippets.

@dimabory
Last active April 23, 2018 09:02
Show Gist options
  • Save dimabory/479e5f4b0ada5fc534c5a83073f11df6 to your computer and use it in GitHub Desktop.
Save dimabory/479e5f4b0ada5fc534c5a83073f11df6 to your computer and use it in GitHub Desktop.
api-history

Request:

GET /api/history/?auth_key={auth_key}&event={0|1|2}[&album={[0-9]+}&offset={[0-9]+}&limit={[0-9]+}&from_datetime={from_timestamp}&to_datetime={to_timestamp}]

Query Params

auth_key - required, string 

event - required, integer, one of [0, 1, 2], 0 - DELETED, 1 - CHANGED, 2 - ADDED

album - optional, integer

offset - optional, integer, by default = 0

limit - optional, integer, by default = 20, max = 50

from_datetime - optional, timestamp

to_datetime - optional, timestamp

Response:

{
    "event": integer,
    "offset": integer,
    "limit": integer,
    "result": Object[]
}

RESULT

event = 0 (DELETED):

{
    "id": string,
    "album": integer,
    "stock_number": string,
    "updated_at": string
}

event = 1 (CHANGED):

{
    "id": string,
    "album": integer,
    "photo_id": string,
    "text": string,
    "stock_number": string,
    "updated_at": string
}	

event = 2 (ADDED):

{
    "id": string,
    "album": string,
    "photo_id": string,
    "album": integer,
    "text": string,
    "stock_number": string,
    "updated_at": string,
    "url": string
}	

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment