-
Notifications
You must be signed in to change notification settings - Fork 1
2. APIs and Controller
Return ReMemri pins that are within a given threshold of the user's current location. If the current user is logged in, the user will be able to see their friend's nearby pins as well as public pins (if they so choose). If no user is logged in, only public pins will be able to be seen.
Endpoint: GET /nearby_pins/
Request Parameters
| Key | Location | Type | Description |
|---|---|---|---|
username |
Session Cookie | String | Unique ID for the current User |
current_location |
JSON | String | User's current location |
Returns
| Key | Location | Type | Description |
|---|---|---|---|
nearby_pins |
JSON | JSON List | List of nearby pins |
Return information about a specific ReMemri pin. A pin contains one post with an image and comments.
Endpoint: GET /pin/pin_id/
Request Parameters
| Key | Location | Type | Description |
|---|---|---|---|
username |
Session Cookie | String | Current User |
Returns
A JSON object with a nested JSON object for comments, the nested field is detailed below this initial table
| Key | Location | Type | Description |
|---|---|---|---|
pin_id |
JSON | Integer | Unique ID for the pin |
owner_id |
JSON | String | Unique username for the owner of the pin |
is_owned_by_user |
JSON | Boolean | Truth value for whether or not the pin is owned by the signed in user |
media_url |
JSON | String | URL for the given media |
timestamp |
JSON | String | Time this pin was created |
comments |
JSON | JSON Object | List of comments (and their information) associated with the pin |
Comment -- Nested JSON Object Description
| Key | Location | Type | Description |
|---|---|---|---|
comment_id |
JSON | Integer | Unique ID for the comment |
comment_text |
JSON | String | Text of the given comment |
comment_timestamp |
JSON | String | Time this pin was created |
pin_id |
JSON | Integer | Unique ID for the pin this comment is associated with |
owner_id |
JSON | String | Unique username for the owner of the pin |
is_owned_by_user |
JSON | Boolean | Truth value for whether or not the pin is owned by the signed in use |
Return a list of the current users friends. Note that mutual friendship status is required for one user to see and comment on another user's pins.
Endpoint: GET /friends/
Request Parameters
| Key | Location | Type | Description |
|---|---|---|---|
username |
Session Cookie | String | Current User |
Returns
| Key | Location | Type | Description |
|---|---|---|---|
friend_usernames |
JSON | List | Unique usernames for the user's friends |
Return a list of the current users pending incoming friend requests. The request and return fields are the same as in Get Friends.
Endpoint: GET /friend_requests/incoming/
Return a list of the current users pending outgoing friend requests. The request and return fields are the same as in Get Friends.
Endpoint: GET /friend_requests/outgoing/
Endpoint: POST /pin/
Make a new ReMemri pin and post it to the map. Note that only logged in users can make pins. When a pin is made an image is attached to it and the visibility is set (either public or only friends). Make post is it's own action detailed in the Post Photo section below.
Request Parameters
| Key | Location | Type | Description |
|---|---|---|---|
username |
Session Cookie | String | Current User |
is_public |
JSON | Boolean | Truth value for whether or not the pin has public visibility |
pin_location |
JSON | String | User's current location that the pin is being posted from |
Make and accept friend requests to/from other users in the ReMemri system. Note that only MUTUAL friends (i.e. both users have friended each other) will be able to view and comment on each other's pins. The JSON object that is used for making and accepting friend requests is the same and is detailed below.
Endpoint is: POST /friend_request/
Request Parameters
| Key | Location | Type | Description |
|---|---|---|---|
user1 |
Session Cookie | String | Current User |
user2 |
JSON | String | Target User |
action |
JSON | String | User's desired action regarding the friend request, can be either [accept], [reject], or [request] |
Post a comment on a pin in a nearby location. Note that only signed in users will be able to post comments. If a user is not signed in, comments will be displayed on public pins but the user cannot interact.
Endpoint: POST /comment/
Request Parameters
Note: this is similar to the comment object described in the Get Pin section
| Key | Location | Type | Description |
|---|---|---|---|
username |
Session Cookie | String | Current User |
comment_text |
JSON | String | Text of the given comment |
pin_id |
JSON | Integer | Unique ID for the pin this comment is associated with |
Endpoint: POST /accounts/sign_up/
Request Parameters
| Key | Location | Type | Description |
|---|---|---|---|
username |
JSON | String | Chosen username from sign up form |
password |
JSON | String | Chosen password from sign up form |
Endpoint: POST /accounts/sign_in/
Request Parameters
| Key | Location | Type | Description |
|---|---|---|---|
username |
JSON | String | Chosen username from sign in form |
password |
JSON | String | Chosen password from sign in form |
Our front end will be written using a combination of native Kotlin, ARCore, and a third-party SDK called Mapbox. We will also be using the Google Maps API.
Mapbox will be used for ReMemri's map view. The pins will be displayed on the map view and the user will be able to click on pins to view them in Augmented Reality mode.
ARCore will be used for ReMemri's Augmented Rreality view. When a user clicks on a pin in map view, AR view will launch and the user will be able to see the images at the given pin in AR.
We use Google Maps API on the back end to calculate distances between points as well as geocoding to retrieve address information from latitude and longitude data.