Wentao Liu

Imitagram - A Clone of Instagram APIs

25 October 2018

Imitagram was developed when I was doing UniMelb COMP90018 (Mobile Computing Systems Programming) Assignment. This assignment required us to develop an Android application cloning the official Instagram Android App and invoking the canonical APIs. However, most of these public APIs were deprecated by the end of 2018.

So I built a clone of those APIs.

The source code is hosted on GitHub, and here you can find a running demo (temporarily unavailable) that you can play with.

API Documentation

Register and Login

POST /api-token-auth

Get the access token by providing authentication credentials (username and password)

req { username, password }
res { token }

POST /register

Registration

req { username, password1, password2 }
res { key }

Accessing the following APIs needs authorization. You must get an access token via the signin/signup first, then put the token into request headers: Authorization: Token {{YOUR_TOKEN_HERE}}

User Feed

GET /users/self/feed

get a list of recent photos posted by users that the current user following

{max_id , min_id, count }

GET /media/media-id/comments

get a list of comments of a media object

{ user, text, created_at }

POST /media/media-id/comments

{ text }

GET /media/media-id/likes

get a list of users who have liked a media

POST /media/media-id/likes

set a like on this media by the current user

Discover

GET /users/search

get a list of users matching the query

req { q }
res { a list of users }

GET /users/self/suggest

get a list of suggested users

Photo

POST /media/upload

upload a media object by the current user

req { file, lat, lng }
res HTTP status 204

Activities

GET /activities/self

get a list of activities of the current user (who liked your photos & who started following you)

GET /activities/following

get a list of activities of users that the current user follow (who posted a new photo & who started following someone & who like a photo)

Profile

GET /users/self

get stats of the current user

GET /users/self/media/recent

get a list of recent photos uploaded by the current user

Relationships

POST /relationships/follow

Follow a user

req { follow }
res HTTP status 204

© 2013-2019 Wentao Liu