socket.io is cool.
Ah, glad to hear someone else is familiar with it. Looks neat, judging from
their minimalist website and how easy it was to setup (as in their chat
tutorial).
I wrote a server application for it a while back called Realtime. It
allowed a bunch of webclients to connect up and subscribe to channels, by
communicating through a message server. Was originally going to be a
commercial product for someone but we ended up just throwing it on my
github and not going any further with the project.
I had a quick look at your github repo, it’s about 3 years old! Looks like
I’m late to the party.
- Get all events
- GET /api/events
- Get one events
- GET /api/events/123
- Create a new event
- POST /api/events
- Update an existing event
- PUT /api/events/123
Sounds good to me. I’ve also got a book on the topic which I found quite
engaging.
- http://shop.oreilly.com/product/9780596805838.do
They also speak of POST being for creation and PUT for modification.
Spontaneously I considered PUT to be “putting” something into something -
like appending to a list - and not for it to already be there.
Anyway, thanks!
Best,
Marcus
On 15 October 2014 19:21, Justin Israel <[email protected]> wrote:
> socket.io is cool. I wrote a server application for it a while back
> called Realtime. It allowed a bunch of webclients to connect up and
> subscribe to channels, by communicating through a message server. Was
> originally going to be a commercial product for someone but we ended up
> just throwing it on my github and not going any further with the project.
>
> That seems to work just as you intended. The only thing you may end up
> exploring further is your url scheme. Like, the PUT in a restful uri
> usually means to update one or more existing resources, and POST would mean
> to create one or more new sources. So creating an event may look like this,
> and possibly return an ID (or not if they aren't being stored)
>
> Get all events
> GET /api/events
> Get one events
> GET /api/events/123
> Create a new event
> POST /api/events
> Update an existing event
> PUT /api/events/123
> On 16/10/2014 7:00 AM, "Marcus Ottosson" <[email protected]> wrote:
>
>> WebSockets worked great for this task! More specifically, socket.io
>>
>> Here’s how it works currently.
>>
>>
>> -
>> https://github.com/abstractfactory/pyblish/issues/99#issuecomment-59247114
>>
>> API
>>
>> Adding entries from Python then looks like this.
>>
>> from requests import put
>> put('http://localhost:5000/event', data={'name': 'EventName02'})
>>
>> Any thoughts?
>>
>> Best,
>> Marcus
>>
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Python Programming for Autodesk Maya" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/python_inside_maya/CAFRtmOCSffcSN9N64Jxf8pvLXPJjYRKh%3DfMvuCbsts4n%2BjTL2w%40mail.gmail.com
>> <https://groups.google.com/d/msgid/python_inside_maya/CAFRtmOCSffcSN9N64Jxf8pvLXPJjYRKh%3DfMvuCbsts4n%2BjTL2w%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Python Programming for Autodesk Maya" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA1UX2fKMqaciyd1w0gND0BKSP9WN44j4GzYrHWKKdB9QQ%40mail.gmail.com
> <https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA1UX2fKMqaciyd1w0gND0BKSP9WN44j4GzYrHWKKdB9QQ%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>
--
*Marcus Ottosson*
[email protected]
--
You received this message because you are subscribed to the Google Groups
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/python_inside_maya/CAFRtmODc6zJO%2B_J3vSNVMfB7fSeWRnuONoAJEmoVLmh4R9nKqQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.