Open roiLeo opened 1 year ago
Hey, thanks for you suggestion! I have a couple of Qs
use kebab-case for urls
Will do!
plural name for ressources
so rename itemList
to items
? My brain process was avoiding s
in url because people can make typos easily.
use nouns instead of action
ELI5 pls? 🥺
so rename
itemList
toitems
? My brain process was avoidings
in url because people can make typos easily.
use nouns instead of action
ELI5 pls? 🥺
Wow, I wouldn't hand over the task of writing an Api to a 5 year old 😅
I was referring to the REST part that should be Stateless:
/collections/:id
/collections?issuer=:issuer
/collections?owner=:owner
/events?address=:address
/events?interaction=:interaction
or => /items/:id/events?interaction=:interaction
/items/:id/events
/items/:id
/collections/:id/items
/items?issuer=:issuer
/items?cid=:cid
/items?owner=:owner
/items?owner=:address
it should be human readable & easy to extend.
Bonus: It would be top if you could create a Swagger doc for this api specs
Wow! Now I understand that!
I have just a couple of problems:
/collections/:id/items
Other option I have in mind it to fork
and write proper api 😅
I have just a couple of problems:
- I currently cant parse queries like
/collections/:id/items
- when Is it as query param I can't validate if fields are correct
- I need to rethink how the REST magic is built (now it's build on the top of client query.
I would like to help you but I don't have enough knowledge on TS backend (only basic express experience) Like how do you handle different endpoints query? are you wrapping gql with a rest api?
Other option I have in mind it to fork https://github.com/unjs/ungh and write proper api 😅
Code looks simpler & maintenable. I agree with that.
Like how do you handle different endpoints query? are you wrapping gql with a rest api?
basically what rest
this version does it that expect path like /{chain}/{call}/{id}
Then I check the call
against the map I have defined (let's assign the result to fn
)
Last thing I do is make const query = fn(id)
Find endpoint based on the chain
and wrap it together
Code looks simpler & maintenable. I agree with that.
Decided to deprecate this one for the sake of #29
Decided to deprecate this one for the sake of #29
wdym? new api version? new routes? nitro stack?
wdym? new api version? new routes? nitro stack?
Like plan to remove the ask
function for uniquery and would rather develop hosted version (nitro/hono) based on the client implementation.
Please:
/resources/:resourceId/subresources
=>/collections/:id/items