blogger

package
v0.0.0-...-c37129a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 16, 2016 License: BSD-3-Clause Imports: 11 Imported by: 0

Documentation

Overview

Package blogger provides access to the Blogger API.

See https://developers.google.com/blogger/docs/2.0/json/getting_started

Usage example:

import "google.golang.org/api/blogger/v2"
...
bloggerService, err := blogger.New(oauthHttpClient)

Index

Constants

View Source
const (
	// Manage your Blogger account
	BloggerScope = "https://www.googleapis.com/auth/blogger"
)

OAuth2 scopes used by this API.

Variables

This section is empty.

Functions

This section is empty.

Types

type Blog

type Blog struct {
	// Description: The description of this blog. This is displayed
	// underneath the title.
	Description string `json:"description,omitempty"`

	// Id: The identifier for this resource.
	Id int64 `json:"id,omitempty,string"`

	// Kind: The kind of this entry. Always blogger#blog
	Kind string `json:"kind,omitempty"`

	// Locale: The locale this Blog is set to.
	Locale *BlogLocale `json:"locale,omitempty"`

	// Name: The name of this blog. This is displayed as the title.
	Name string `json:"name,omitempty"`

	// Pages: The container of pages in this blog.
	Pages *BlogPages `json:"pages,omitempty"`

	// Posts: The container of posts in this blog.
	Posts *BlogPosts `json:"posts,omitempty"`

	// Published: RFC 3339 date-time when this blog was published.
	Published string `json:"published,omitempty"`

	// SelfLink: The API REST URL to fetch this resource from.
	SelfLink string `json:"selfLink,omitempty"`

	// Updated: RFC 3339 date-time when this blog was last updated.
	Updated string `json:"updated,omitempty"`

	// Url: The URL where this blog is published.
	Url string `json:"url,omitempty"`
}

type BlogList

type BlogList struct {
	// Items: The list of Blogs this user has Authorship or Admin rights
	// over.
	Items []*Blog `json:"items,omitempty"`

	// Kind: The kind of this entity. Always blogger#blogList
	Kind string `json:"kind,omitempty"`
}

type BlogLocale

type BlogLocale struct {
	// Country: The country this blog's locale is set to.
	Country string `json:"country,omitempty"`

	// Language: The language this blog is authored in.
	Language string `json:"language,omitempty"`

	// Variant: The language variant this blog is authored in.
	Variant string `json:"variant,omitempty"`
}

type BlogPages

type BlogPages struct {
	// SelfLink: The URL of the container for pages in this blog.
	SelfLink string `json:"selfLink,omitempty"`

	// TotalItems: The count of pages in this blog.
	TotalItems int64 `json:"totalItems,omitempty"`
}

type BlogPosts

type BlogPosts struct {
	// SelfLink: The URL of the container for posts in this blog.
	SelfLink string `json:"selfLink,omitempty"`

	// TotalItems: The count of posts in this blog.
	TotalItems int64 `json:"totalItems,omitempty"`
}

type BlogsGetCall

type BlogsGetCall struct {
	// contains filtered or unexported fields
}

func (*BlogsGetCall) Do

func (c *BlogsGetCall) Do() (*Blog, error)

func (*BlogsGetCall) Fields

func (c *BlogsGetCall) Fields(s ...googleapi.Field) *BlogsGetCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

type BlogsService

type BlogsService struct {
	// contains filtered or unexported fields
}

func NewBlogsService

func NewBlogsService(s *Service) *BlogsService

func (*BlogsService) Get

func (r *BlogsService) Get(blogId string) *BlogsGetCall

Get: Gets one blog by id.

type Comment

type Comment struct {
	// Author: The author of this Comment.
	Author *CommentAuthor `json:"author,omitempty"`

	// Blog: Data about the blog containing this comment.
	Blog *CommentBlog `json:"blog,omitempty"`

	// Content: The actual content of the comment. May include HTML markup.
	Content string `json:"content,omitempty"`

	// Id: The identifier for this resource.
	Id int64 `json:"id,omitempty,string"`

	// InReplyTo: Data about the comment this is in reply to.
	InReplyTo *CommentInReplyTo `json:"inReplyTo,omitempty"`

	// Kind: The kind of this entry. Always blogger#comment
	Kind string `json:"kind,omitempty"`

	// Post: Data about the post containing this comment.
	Post *CommentPost `json:"post,omitempty"`

	// Published: RFC 3339 date-time when this comment was published.
	Published string `json:"published,omitempty"`

	// SelfLink: The API REST URL to fetch this resource from.
	SelfLink string `json:"selfLink,omitempty"`

	// Updated: RFC 3339 date-time when this comment was last updated.
	Updated string `json:"updated,omitempty"`
}

type CommentAuthor

type CommentAuthor struct {
	// DisplayName: The display name.
	DisplayName string `json:"displayName,omitempty"`

	// Id: The identifier of the Comment creator.
	Id string `json:"id,omitempty"`

	// Image: The comment creator's avatar.
	Image *CommentAuthorImage `json:"image,omitempty"`

	// Url: The URL of the Comment creator's Profile page.
	Url string `json:"url,omitempty"`
}

type CommentAuthorImage

type CommentAuthorImage struct {
	// Url: The comment creator's avatar URL.
	Url string `json:"url,omitempty"`
}

type CommentBlog

type CommentBlog struct {
	// Id: The identifier of the blog containing this comment.
	Id int64 `json:"id,omitempty,string"`
}

type CommentInReplyTo

type CommentInReplyTo struct {
	// Id: The identified of the parent of this comment.
	Id int64 `json:"id,omitempty,string"`
}

type CommentList

type CommentList struct {
	// Items: The List of Comments for a Post.
	Items []*Comment `json:"items,omitempty"`

	// Kind: The kind of this entry. Always blogger#commentList
	Kind string `json:"kind,omitempty"`

	// NextPageToken: Pagination token to fetch the next page, if one
	// exists.
	NextPageToken string `json:"nextPageToken,omitempty"`

	// PrevPageToken: Pagination token to fetch the previous page, if one
	// exists.
	PrevPageToken string `json:"prevPageToken,omitempty"`
}

type CommentPost

type CommentPost struct {
	// Id: The identifier of the post containing this comment.
	Id int64 `json:"id,omitempty,string"`
}

type CommentsGetCall

type CommentsGetCall struct {
	// contains filtered or unexported fields
}

func (*CommentsGetCall) Do

func (c *CommentsGetCall) Do() (*Comment, error)

func (*CommentsGetCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

type CommentsListCall

type CommentsListCall struct {
	// contains filtered or unexported fields
}

func (*CommentsListCall) Do

func (c *CommentsListCall) Do() (*CommentList, error)

func (*CommentsListCall) FetchBodies

func (c *CommentsListCall) FetchBodies(fetchBodies bool) *CommentsListCall

FetchBodies sets the optional parameter "fetchBodies": Whether the body content of the comments is included.

func (*CommentsListCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*CommentsListCall) MaxResults

func (c *CommentsListCall) MaxResults(maxResults int64) *CommentsListCall

MaxResults sets the optional parameter "maxResults": Maximum number of comments to include in the result.

func (*CommentsListCall) PageToken

func (c *CommentsListCall) PageToken(pageToken string) *CommentsListCall

PageToken sets the optional parameter "pageToken": Continuation token if request is paged.

func (*CommentsListCall) StartDate

func (c *CommentsListCall) StartDate(startDate string) *CommentsListCall

StartDate sets the optional parameter "startDate": Earliest date of comment to fetch, a date-time with RFC 3339 formatting.

type CommentsService

type CommentsService struct {
	// contains filtered or unexported fields
}

func NewCommentsService

func NewCommentsService(s *Service) *CommentsService

func (*CommentsService) Get

func (r *CommentsService) Get(blogId string, postId string, commentId string) *CommentsGetCall

Get: Gets one comment by id.

func (*CommentsService) List

func (r *CommentsService) List(blogId string, postId string) *CommentsListCall

List: Retrieves the comments for a blog, possibly filtered.

type Page

type Page struct {
	// Author: The author of this Page.
	Author *PageAuthor `json:"author,omitempty"`

	// Blog: Data about the blog containing this Page.
	Blog *PageBlog `json:"blog,omitempty"`

	// Content: The body content of this Page, in HTML.
	Content string `json:"content,omitempty"`

	// Id: The identifier for this resource.
	Id int64 `json:"id,omitempty,string"`

	// Kind: The kind of this entity. Always blogger#page
	Kind string `json:"kind,omitempty"`

	// Published: RFC 3339 date-time when this Page was published.
	Published string `json:"published,omitempty"`

	// SelfLink: The API REST URL to fetch this resource from.
	SelfLink string `json:"selfLink,omitempty"`

	// Title: The title of this entity. This is the name displayed in the
	// Admin user interface.
	Title string `json:"title,omitempty"`

	// Updated: RFC 3339 date-time when this Page was last updated.
	Updated string `json:"updated,omitempty"`

	// Url: The URL that this Page is displayed at.
	Url string `json:"url,omitempty"`
}

type PageAuthor

type PageAuthor struct {
	// DisplayName: The display name.
	DisplayName string `json:"displayName,omitempty"`

	// Id: The identifier of the Page creator.
	Id string `json:"id,omitempty"`

	// Image: The page author's avatar.
	Image *PageAuthorImage `json:"image,omitempty"`

	// Url: The URL of the Page creator's Profile page.
	Url string `json:"url,omitempty"`
}

type PageAuthorImage

type PageAuthorImage struct {
	// Url: The page author's avatar URL.
	Url string `json:"url,omitempty"`
}

type PageBlog

type PageBlog struct {
	// Id: The identifier of the blog containing this page.
	Id int64 `json:"id,omitempty,string"`
}

type PageList

type PageList struct {
	// Items: The list of Pages for a Blog.
	Items []*Page `json:"items,omitempty"`

	// Kind: The kind of this entity. Always blogger#pageList
	Kind string `json:"kind,omitempty"`
}

type PagesGetCall

type PagesGetCall struct {
	// contains filtered or unexported fields
}

func (*PagesGetCall) Do

func (c *PagesGetCall) Do() (*Page, error)

func (*PagesGetCall) Fields

func (c *PagesGetCall) Fields(s ...googleapi.Field) *PagesGetCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

type PagesListCall

type PagesListCall struct {
	// contains filtered or unexported fields
}

func (*PagesListCall) Do

func (c *PagesListCall) Do() (*PageList, error)

func (*PagesListCall) FetchBodies

func (c *PagesListCall) FetchBodies(fetchBodies bool) *PagesListCall

FetchBodies sets the optional parameter "fetchBodies": Whether to retrieve the Page bodies.

func (*PagesListCall) Fields

func (c *PagesListCall) Fields(s ...googleapi.Field) *PagesListCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

type PagesService

type PagesService struct {
	// contains filtered or unexported fields
}

func NewPagesService

func NewPagesService(s *Service) *PagesService

func (*PagesService) Get

func (r *PagesService) Get(blogId string, pageId string) *PagesGetCall

Get: Gets one blog page by id.

func (*PagesService) List

func (r *PagesService) List(blogId string) *PagesListCall

List: Retrieves pages for a blog, possibly filtered.

type Post

type Post struct {
	// Author: The author of this Post.
	Author *PostAuthor `json:"author,omitempty"`

	// Blog: Data about the blog containing this Post.
	Blog *PostBlog `json:"blog,omitempty"`

	// Content: The content of the Post. May contain HTML markup.
	Content string `json:"content,omitempty"`

	// Id: The identifier of this Post.
	Id int64 `json:"id,omitempty,string"`

	// Kind: The kind of this entity. Always blogger#post
	Kind string `json:"kind,omitempty"`

	// Labels: The list of labels this Post was tagged with.
	Labels []string `json:"labels,omitempty"`

	// Published: RFC 3339 date-time when this Post was published.
	Published string `json:"published,omitempty"`

	// Replies: The container of comments on this Post.
	Replies *PostReplies `json:"replies,omitempty"`

	// SelfLink: The API REST URL to fetch this resource from.
	SelfLink string `json:"selfLink,omitempty"`

	// Title: The title of the Post.
	Title string `json:"title,omitempty"`

	// Updated: RFC 3339 date-time when this Post was last updated.
	Updated string `json:"updated,omitempty"`

	// Url: The URL where this Post is displayed.
	Url string `json:"url,omitempty"`
}

type PostAuthor

type PostAuthor struct {
	// DisplayName: The display name.
	DisplayName string `json:"displayName,omitempty"`

	// Id: The identifier of the Post creator.
	Id string `json:"id,omitempty"`

	// Image: The Post author's avatar.
	Image *PostAuthorImage `json:"image,omitempty"`

	// Url: The URL of the Post creator's Profile page.
	Url string `json:"url,omitempty"`
}

type PostAuthorImage

type PostAuthorImage struct {
	// Url: The Post author's avatar URL.
	Url string `json:"url,omitempty"`
}

type PostBlog

type PostBlog struct {
	// Id: The identifier of the Blog that contains this Post.
	Id int64 `json:"id,omitempty,string"`
}

type PostList

type PostList struct {
	// Items: The list of Posts for this Blog.
	Items []*Post `json:"items,omitempty"`

	// Kind: The kind of this entity. Always blogger#postList
	Kind string `json:"kind,omitempty"`

	// NextPageToken: Pagination token to fetch the next page, if one
	// exists.
	NextPageToken string `json:"nextPageToken,omitempty"`

	// PrevPageToken: Pagination token to fetch the previous page, if one
	// exists.
	PrevPageToken string `json:"prevPageToken,omitempty"`
}

type PostReplies

type PostReplies struct {
	// SelfLink: The URL of the comments on this post.
	SelfLink string `json:"selfLink,omitempty"`

	// TotalItems: The count of comments on this post.
	TotalItems int64 `json:"totalItems,omitempty,string"`
}

type PostsGetCall

type PostsGetCall struct {
	// contains filtered or unexported fields
}

func (*PostsGetCall) Do

func (c *PostsGetCall) Do() (*Post, error)

func (*PostsGetCall) Fields

func (c *PostsGetCall) Fields(s ...googleapi.Field) *PostsGetCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

type PostsListCall

type PostsListCall struct {
	// contains filtered or unexported fields
}

func (*PostsListCall) Do

func (c *PostsListCall) Do() (*PostList, error)

func (*PostsListCall) FetchBodies

func (c *PostsListCall) FetchBodies(fetchBodies bool) *PostsListCall

FetchBodies sets the optional parameter "fetchBodies": Whether the body content of posts is included.

func (*PostsListCall) Fields

func (c *PostsListCall) Fields(s ...googleapi.Field) *PostsListCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*PostsListCall) MaxResults

func (c *PostsListCall) MaxResults(maxResults int64) *PostsListCall

MaxResults sets the optional parameter "maxResults": Maximum number of posts to fetch.

func (*PostsListCall) PageToken

func (c *PostsListCall) PageToken(pageToken string) *PostsListCall

PageToken sets the optional parameter "pageToken": Continuation token if the request is paged.

func (*PostsListCall) StartDate

func (c *PostsListCall) StartDate(startDate string) *PostsListCall

StartDate sets the optional parameter "startDate": Earliest post date to fetch, a date-time with RFC 3339 formatting.

type PostsService

type PostsService struct {
	// contains filtered or unexported fields
}

func NewPostsService

func NewPostsService(s *Service) *PostsService

func (*PostsService) Get

func (r *PostsService) Get(blogId string, postId string) *PostsGetCall

Get: Get a post by id.

func (*PostsService) List

func (r *PostsService) List(blogId string) *PostsListCall

List: Retrieves a list of posts, possibly filtered.

type Service

type Service struct {
	BasePath string // API endpoint base URL

	Blogs *BlogsService

	Comments *CommentsService

	Pages *PagesService

	Posts *PostsService

	Users *UsersService
	// contains filtered or unexported fields
}

func New

func New(client *http.Client) (*Service, error)

type User

type User struct {
	// About: Profile summary information.
	About string `json:"about,omitempty"`

	// Blogs: The container of blogs for this user.
	Blogs *UserBlogs `json:"blogs,omitempty"`

	// Created: The timestamp of when this profile was created, in seconds
	// since epoch.
	Created string `json:"created,omitempty"`

	// DisplayName: The display name.
	DisplayName string `json:"displayName,omitempty"`

	// Id: The identifier for this User.
	Id string `json:"id,omitempty"`

	// Kind: The kind of this entity. Always blogger#user
	Kind string `json:"kind,omitempty"`

	// Locale: This user's locale
	Locale *UserLocale `json:"locale,omitempty"`

	// SelfLink: The API REST URL to fetch this resource from.
	SelfLink string `json:"selfLink,omitempty"`

	// Url: The user's profile page.
	Url string `json:"url,omitempty"`
}

type UserBlogs

type UserBlogs struct {
	// SelfLink: The URL of the Blogs for this user.
	SelfLink string `json:"selfLink,omitempty"`
}

type UserLocale

type UserLocale struct {
	// Country: The user's country setting.
	Country string `json:"country,omitempty"`

	// Language: The user's language setting.
	Language string `json:"language,omitempty"`

	// Variant: The user's language variant setting.
	Variant string `json:"variant,omitempty"`
}

type UsersBlogsListCall

type UsersBlogsListCall struct {
	// contains filtered or unexported fields
}

func (*UsersBlogsListCall) Do

func (c *UsersBlogsListCall) Do() (*BlogList, error)

func (*UsersBlogsListCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

type UsersBlogsService

type UsersBlogsService struct {
	// contains filtered or unexported fields
}

func NewUsersBlogsService

func NewUsersBlogsService(s *Service) *UsersBlogsService

func (*UsersBlogsService) List

func (r *UsersBlogsService) List(userId string) *UsersBlogsListCall

List: Retrieves a list of blogs, possibly filtered.

type UsersGetCall

type UsersGetCall struct {
	// contains filtered or unexported fields
}

func (*UsersGetCall) Do

func (c *UsersGetCall) Do() (*User, error)

func (*UsersGetCall) Fields

func (c *UsersGetCall) Fields(s ...googleapi.Field) *UsersGetCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

type UsersService

type UsersService struct {
	Blogs *UsersBlogsService
	// contains filtered or unexported fields
}

func NewUsersService

func NewUsersService(s *Service) *UsersService

func (*UsersService) Get

func (r *UsersService) Get(userId string) *UsersGetCall

Get: Gets one user by id.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL