Created
December 9, 2008 14:55
-
-
Save tobi/33919 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ================== | |
# After login | |
# getting all blogs for a drop down: | |
blogs = ShopifyAPI::Blog.find(:all) | |
blogs.each do |blog| | |
blog.id #=> 439432 | |
blog.title #=> "My cool blog" | |
end | |
# Now you can save the permission token (password) and the selected blog Id to your database. | |
# For more information on blogs see http://www.shopify.com/developers/api/blog.html | |
# =================== | |
# Posting an article | |
ShopifyAPI::Article.new( | |
:blog_id => posterous_blog_id, | |
:title => 'My new Article title', | |
:body => "<notextile>#{posterous_body}</notextile>" | |
) | |
# For more information on articles you can go to | |
# http://www.shopify.com/developers/api/article.html#create |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment