Closed mattgstevens closed 8 years ago
I need some REST! 😪💤
POST api.getmomona.com/0/content/?return=[javascript|url|contentId]
When javascript
you get a JS snippet, ready to paste into your web site.
When url
, you get a GET
-able url to our api, looks like https://api.getmomona.com/0/content/${contentId}
. I think this should be the default.
When contentId
you only get contentId
back.
Lemme know if you have any other idea bud :)
Let's list what data are required to add a content. I assume these should be URL params to the POST eh?
contentData
mimeType
payoutAddress
price
currency
(optional, defaults to satoshi)Anything more?
This is what I loved about Rails - everything starts with a route, and it's all very RESTy
for the js-snippet part: lets publish to npm and import it
Closing this as done - even if we havent implemented the JS snippet thing. That can be a nice feature we add later.
What we have now
What we want to have
POST /content
(question: I guess data goes in url params?)contentId
or a URL to get to see the content. (question: what does REST say we should return after creating a new resource?)