Esempio n. 1
0
File: test.go Progetto: 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
}
Esempio n. 2
0
File: test.go Progetto: 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
}