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.
For more options, visit https://groups.google.com/d/optout.