inSquare API
Geolocalized interactions through inSquare API
Version: 2.0.0
All rights reserved
http://apache.org/licenses/LICENSE-2.0.html
Access
[ Jump to Models ]
Table of Contents
patch /apnToken
delete /favouritesquares
get /favouritesquares/{id}
post /favouritesquares
patch /gcmToken
get /messages
post /notifyEvent
post /notifyFavourers
post /notifyRecents
get /profilePictures/{userId}
delete /recentSquares
get /recentSquares/{userId}
post /recents
delete /squares
get /squares
get /squares/{id}
patch /squares
post /squares
get /user
patch /user
Post the user frontend GCM push token on server (apnTokenPatch)
Query parameters
isApple (required)
Query Parameter — Must be set to true
userId (required)
Query Parameter —
token (required)
Query Parameter —
Return type
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the
Content-Type response header.
Responses
200
Ok
0
unexpected error
Up
delete /favouritesquares
Remove a Square from favourites squares of a User (favouritesquaresDelete)
Query parameters
userId (required)
Query Parameter — The User ID
squareId (required)
Query Parameter — The square you want to remove from a User Favourite
Return type
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the
Content-Type response header.
Responses
200
La square \u00E8 stata aggiunta come preferita
0
unexpected error
Up
get /favouritesquares/{id}
Favorite squares of a User (favouritesquaresIdGet)
Path parameters
id (required)
Path Parameter — The user Id
Return type
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the
Content-Type response header.
Responses
200
Favourite squares of a specified used
0
unexpected error
Up
post /favouritesquares
Match a square with the Favourite Squares of a User (favouritesquaresPost)
Query parameters
userId (required)
Query Parameter — The User ID
squareId (required)
Query Parameter — The new favourite square ID of the User
Return type
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the
Content-Type response header.
Responses
200
La square \u00E8 stata aggiunta come preferita
0
unexpected error
Post the user frontend GCM push token on server (gcmTokenPatch)
Request body
GCM (required)
Body Parameter — The user ID
Return type
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the
Content-Type response header.
Responses
200
GCM TOKEN on Server
0
unexpected error
Get alist of messages from a square (messagesGet)
Query parameters
square (required)
Query Parameter — Square ID
size (required)
Query Parameter — The maximum number of messages you want.
recent (required)
Query Parameter — Must be true
Return type
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the
Content-Type response header.
Responses
200
A list of messages on a square
0
Malformed query
Notify to all users a specified event (notifyEventPost)
Query parameters
squareId (required)
Query Parameter —
userId (required)
Query Parameter —
event (required)
Query Parameter —
Return type
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the
Content-Type response header.
Responses
200
Ok
0
unexpected error
Notify to favourite users an event message (notifyFavourersPost)
Query parameters
squareId (required)
Query Parameter —
userId (required)
Query Parameter —
text (required)
Query Parameter —
Return type
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the
Content-Type response header.
Responses
200
Ok
0
unexpected error
Notify to recent users an event message (notifyRecentsPost)
Query parameters
squareId (required)
Query Parameter —
userId (required)
Query Parameter —
text (required)
Query Parameter —
Return type
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the
Content-Type response header.
Responses
200
Ok
0
unexpected error
Up
get /profilePictures/{userId}
Get the url of user's Profile Picture from Google or Facebook (profilePicturesUserIdGet)
Path parameters
userId (required)
Path Parameter — User ID
Return type
String
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the
Content-Type response header.
Responses
200
Photo Profile URL
0
Malformed query
Remove a recent Squares from a specfied User (recentSquaresDelete)
Query parameters
userId (required)
Query Parameter —
squareId (required)
Query Parameter —
Return type
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the
Content-Type response header.
Responses
200
Recenti eliminate
0
Recenti non eliminate, userId non valido
Up
get /recentSquares/{userId}
Recent squares of a User (recentSquaresUserIdGet)
Path parameters
userId (required)
Path Parameter — The user Id
Return type
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the
Content-Type response header.
Responses
200
Recent squares of a specified used
0
unexpected error
Add to a user a recent square (recentsPost)
Query parameters
squareId (required)
Query Parameter —
userId (required)
Query Parameter —
Return type
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the
Content-Type response header.
Responses
200
Ok
0
unexpected error
Delete a square by id and owner (squaresDelete)
Query parameters
squareId (required)
Query Parameter —
ownerId (optional)
Query Parameter —
Return type
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the
Content-Type response header.
Responses
200
Square eliminata con successo!
0
unexpected error
(squaresGet)
Squares by ownerId, name or topic
Query parameters
byOwner (optional)
Query Parameter — Execute a search by ownerId
byTopic (optional)
Query Parameter — Execute a search by a topic
autocomplete (optional)
Query Parameter — Owr backend tries to guess the square that match most.
ownerId (optional)
Query Parameter — The userID of the square's owner
name (optional)
Query Parameter — Name of the square or topic you want to search.
lat (optional)
Query Parameter — Latitude of the user.
lon (optional)
Query Parameter — Longitude of the user.
Return type
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the
Content-Type response header.
Responses
200
The squares you searched ordered by distance from your location if provided. The query returns maximum 10000 squares.
0
Invalid query
Get square by id (squaresIdGet)
Path parameters
id (required)
Path Parameter — The ID of the square to fetch
Return type
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the
Content-Type response header.
Responses
200
Square with the specified ID
0
unexpected error
(squaresPatch)
Update the description of a specified square
Query parameters
squareId (required)
Query Parameter — Square ID
ownerId (required)
Query Parameter —
description (optional)
Query Parameter — Description to update
name (optional)
Query Parameter —
expireTime (optional)
Query Parameter —
Return type
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the
Content-Type response header.
Responses
200
La descrizione square \u00E8 stata modificata
0
unexpected error
(squaresPost)
Creates a new square. Duplicates are allowed
Request body
square (required)
Body Parameter — Square to add
Return type
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the
Content-Type response header.
Responses
200
square response
0
unexpected error
Get users on the square or get the last location of a specified user (userGet)
Query parameters
byLocation (optional)
Query Parameter — True if you want to get User last location
userId (optional)
Query Parameter — The id of the user you want to retrive the last location
squareId (optional)
Query Parameter — The square ID
distance (optional)
Query Parameter — The maximum distance from the square.
Return type
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the
Content-Type response header.
Responses
200
Last location of a user or an array of users
0
unexpected error
Update the current user's location (userPatch)
Request body
user (required)
Body Parameter — The user
Return type
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the
Content-Type response header.
Responses
200
User lastLocation update SUCCESSFUL
0
User lastLocation update NOT SUCCESSFUL
[ Jump to Methods ]
Table of Contents
Error
GCM
Message
NewMessage
NewSquare
NewUser
Square
StatusMessage
User
code
Integer
message
String
text
String
createdAt
date
senderId
User
squareId
Square
id
String
text
String
createdAt
date
senderId
User
squareId
Square
name
String
lat
String
lon
String
ownerId
String
description
String
facebookIdPage
String
facebookIdEvent
String
expireTime
String
type
String
name
String
lat
String
lon
String
ownerId
String
description
String
facebookIdPage
String
facebookIdEvent
String
expireTime
String
type
String
id
String
code
Integer
message
String
lat
String
lon
String
id
String