Python Script for creating a stream subscription

1 view
Skip to first unread message

ken ellis

unread,
Dec 18, 2009, 8:57:57 AM12/18/09
to MySpace APIs

Click on http://groups.google.com/group/myspace-apis/web/python-script-for-creating-a-stream-subscription
- or copy & paste it into your browser's address bar if that doesn't
work.

Andy Stack

unread,
Dec 18, 2009, 12:27:47 PM12/18/09
to MySpace APIs
Wow, very timely. Thanks! We were just trying to figure this out too!

On Dec 18, 5:57 am, ken ellis <kael...@gmail.com> wrote:
> Click onhttp://groups.google.com/group/myspace-apis/web/python-script-for-cre...

Chak Nanga

unread,
Dec 18, 2009, 2:20:34 PM12/18/09
to MySpace APIs
Hi:

We have a couple of samples that showcase the usage of Flood/MySpaceID
APIs. Both of these demo apps are built on Google App Engine in
Python.

Here's the source code:

http://code.google.com/p/ms-flood/ [This app integrates myspace id so
that we can have multiple outstanding callback endpoints for testing
various subscription filter options etc]
http://code.google.com/p/msfloodmap/

Please take a look at register_subscription() in trunk/ms-flood/
myspace/myspaceapi.py on how to handle the subscription API call. This
file also has additional myspaceid REST API wrappers

Hope this helps

Chak

Dave Cracknell

unread,
Jan 6, 2010, 8:39:01 PM1/6/10
to MySpace APIs
This was very helpful. I successfully used this code to genreate a
subscription request, but when I tried to use it with GET or PUT, I
was not succcessful. Do you have a version of this code that can GET
the details for an existing subscription or update an exisitng
subscrptionr request via a PUT request?

John Bresnik

unread,
Jan 6, 2010, 10:25:24 PM1/6/10
to myspac...@googlegroups.com
Yea I got a message saying I needed to reactivate my subscription but
never was able to find any documentation on how that was accomplished.
Ended up just creating a new one since that was the only thing
documented.

ken ellis

unread,
Jan 7, 2010, 11:19:31 AM1/7/10
to MySpace APIs
Sure, I added a few lines at the bottom of that script to show how to
use oauth to do a GET for subscription info. You can also use the
developer oauth tool:
http://developer.myspace.com/modules/apis/pages/oauthtool.aspx

Just remember to put in 1.0 for the version, and /stream/subscription/
@all for the resource url.

ken ellis

unread,
Jan 7, 2010, 11:14:59 AM1/7/10
to MySpace APIs
Sure, I changed that page with a few lines at the bottom of that
python script for doing a GET to get subscription info, its fairly
easy with the oauth library. You can also use their oauth tool on the
developer site:

http://developer.myspace.com/modules/apis/pages/oauthtool.aspx

You just have to remember to put in 1.0 for the version, and /stream/
subscription/@all in the resource URL, then do a GET, to get details
of all subscriptions.


On Jan 6, 8:39 pm, Dave Cracknell <groovyco...@gmail.com> wrote:

Dave Cracknell

unread,
Jan 7, 2010, 6:06:02 PM1/7/10
to MySpace APIs
Ken,
That worked for me. However, I am now having a problem attempting to
delete all of the subscriptions. I just changed GET to DELETE and I
am getting error 401 returned. I assumed that there was nothing else
I had to change for a DELETE request. I have submitted a separate
post for this problem.

Thanks again,
Dave

> > subscrptionr request via a PUT request?- Hide quoted text -
>
> - Show quoted text -

Reply all
Reply to author
Forward
0 new messages