Open tgrigoruk opened 4 months ago
The "Search Users" page needs the following data:
The following endpoints need to be implemented (if not already):
GET /interests
- Get a list of ALL interests (id, text)GET /user?interests=<string[]>
- Get a list of users by interestsGET ???
- Get a list of ALL locations (Dropdown option; See [2] on #159)GET /user?country=<string>&province=<string>&city=<string>
- Get a list of users by locationGET /user?name=<string>
- Get a list of users by nameGET /item?
QUERIES TBD - Get a list of items by a set of criterion such as: name, price, onSale, company, etc GET /interests
- Get a list of ALL interests (id, text)[
{
id: 1,
text: 'Star Wars',
},
{
id: 2,
text: 'Star Trek',
},
// ...
]
GET /user?interests=<string[]>
- Get a list of users by interests// GET /user?interests=Star%20Trek%2CDocker%20Who
// interests = "Star Trek,Doctor Who" -- Trimmed tag names, only separated by a single comma
[
{
id: 3,
displayName: 'Alicia',
about: 'I am another generic person.',
twitter: '@alicia_smith',
// interests: [ -- Not shown in response, demo purposes only
// { id: 2, text: 'Star Trek' },
// { id: 12, text: 'Docker Who' },
// { id: 4, text: 'Lord of the Rings' },
// ]
},
{
id: 5,
displayName: 'The Bard',
about: 'I am a famous playwright',
instagram: 'william.shakespeare',
// interests: [
// { id: 2, text: 'Star Trek' },
// { id: 12, text: 'Docker Who' },
// ]
},
]
GET ???
- Get a list of ALL locations (Dropdown option; See [2] on #159)We need to make some decisions about locations: #160
[
{
city: 'Vancouver',
province: 'BC',
},
]
GET /user?country=<string>&province=<string>&city=<string>
- Get a list of users by locationWe need to make some decisions about locations: #160
// GET /user?city=Vancouver&province=BC
[
{
id: 3,
// city: 'Vancouver', -- Not shown in response, demo purposes only
// province: 'BC', -- Not shown in response, demo purposes only
displayName: 'Alicia',
about: 'I am another generic person.',
twitter: '@alicia_smith',
},
{
id: 5,
// city: 'Vancouver',
// province: 'BC',
displayName: 'The Bard',
about: 'I am a famous playwright',
instagram: 'william.shakespeare',
},
]
GET /user?name=<string>
- Get a list of users by name// GET /user?name=alicia
[
{
id: 3,
displayName: 'Alicia',
about: 'I am another generic person.',
twitter: '@alicia_smith',
},
]
GET /item?
QUERIES TBD - Get a list of items by a set of criterion(note: "Interests" is a fronted descriptor, to generalize we'll call them [User | Item] Tags)
I think we could just do a single GET endpoint that will accept any combination of query parameters (name, location*, tags). (location TBD in #160 ).
Let's ignore degree
for now - too complicated.
See #157 for response data fields (required to populate User Cards).
Updated documentation to add GET /item
A user can search for other users using various filters (query params)
GET
/api/v1/user/?name="Clark Kent"&location="Sometown, Canada"°ree=2&interests="Star Wars, Comics, Anime"