示例#1
0
文件: test.go 项目: gloob/gfxBot
// Noop method
// This method requires authentication with 'read' permission.
func Null(client *flickr.FlickrClient) (*flickr.BasicResponse, error) {
	client.Init()
	client.SetOAuthDefaults()
	client.Args.Set("method", "flickr.test.null")
	client.OAuthSign()

	response := &flickr.BasicResponse{}
	err := flickr.DoGet(client, response)
	return response, err
}
示例#2
0
文件: test.go 项目: gloob/gfxBot
// A testing method which checks if the caller is logged in then returns their username.
// This method requires authentication with 'read' permission.
func Login(client *flickr.FlickrClient) (*LoginResponse, error) {
	client.Init()
	client.SetOAuthDefaults()
	client.Args.Set("method", "flickr.test.login")
	client.OAuthSign()

	loginResponse := &LoginResponse{}
	err := flickr.DoGet(client, loginResponse)
	return loginResponse, err
}