On this page:
blogger
blogger-scope
blogger<%>
list-blogs
find-blog
blogger-blog<%>
list-posts
find-post
create-html-post
blogger-post<%>
delete

3 Blogger

 (require webapi/blogger) package: webapi

This library supports a small subset of the Blogger API.

procedure

(blogger #:oauth2 oauth2)  (is-a?/c blogger<%>)

  oauth2 : (is-a?/c oauth2<%>)
Creates a blogger<%> object representing the user who authorized oauth2. The scopes of oauth2 must include blogger-scope.

String representing the “scope” of Blogger resources.

interface

blogger<%> : interface?

  implements: atom-feed-resource<%>
Represents a connection to Blogger for a particular user, namely the one who approved the OAuth2 authorization request.
Obtain an instance via blogger.
For a blogger<%> instance, the atom-feed-resource<%> methods return blogger-blog<%> objects.

method

(send a-blogger list-blogs)  (listof (is-a?/c blogger<%>))

Returns a list of blogs owned by the user.

method

(send a-blogger find-blog title)

  (or/c (is-a?/c blogger<%>) #f)
  title : string?
Returns an object representing the blog named title owned by the user.

interface

blogger-blog<%> : interface?

  implements: atom-feed-resource<%>
Represents a single blog.
Obtain an instance via find-blog, list-blogs, or any of the atom-feed-resource<%> methods with a blogger<%> instance.

method

(send a-blogger-blog list-posts)

  (listof (is-a?/c blogger-post<%>))
Returns a list of all posts contained by the blog.

method

(send a-blogger-blog find-post title)

  (or/c (is-a?/c blogger-post<%>) #f)
  title : string?
Returns the post named title.

method

(send a-blogger-blog create-html-post title 
  html 
  [#:draft? draft? 
  #:tags tags]) 
  (is-a?/c blogger-post<%>)
  title : string?
  html : (or/c input-port? (listof SXML))
  draft? : any/c = #t
  tags : (listof string?) = null
Creates a new blog post with the title title. If html is an input port, the contents of the port is used as the body of the post. Otherwise, it is interpreted as HTML expressed as a list of SXML elements.

interface

blogger-post<%> : interface?

  implements: atom-resource<%>
Represents a blog post.
Obtain an instance via list-posts, find-post, or any of the atom-feed-resource<%> methods with a blogger-blog<%> instance.

method

(send a-blogger-post delete)  void?

Deletes the post.