當前位置: 首頁>>代碼示例>>Golang>>正文


Golang FlickrClient.EndpointUrl方法代碼示例

本文整理匯總了Golang中github.com/masci/flickr.FlickrClient.EndpointUrl方法的典型用法代碼示例。如果您正苦於以下問題:Golang FlickrClient.EndpointUrl方法的具體用法?Golang FlickrClient.EndpointUrl怎麽用?Golang FlickrClient.EndpointUrl使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在github.com/masci/flickr.FlickrClient的用法示例。


在下文中一共展示了FlickrClient.EndpointUrl方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。

示例1: Echo

// A testing method which echo's all parameters back in the response.
// This method does not require authentication.
func Echo(client *flickr.FlickrClient) (*EchoResponse, error) {
	client.EndpointUrl = flickr.API_ENDPOINT
	client.Args.Set("method", "flickr.test.echo")
	client.Args.Set("oauth_consumer_key", client.ApiKey)

	response := &EchoResponse{}
	err := flickr.DoGet(client, response)
	return response, err
}
開發者ID:gloob,項目名稱:gfxBot,代碼行數:11,代碼來源:test.go

示例2: CheckToken

// Returns the credentials attached to an OAuth authentication token.
// This method does not require user authentication, but the request must be api-signed.
func CheckToken(client *flickr.FlickrClient, oauthToken string) (*CheckTokenResponse, error) {
	client.EndpointUrl = flickr.API_ENDPOINT
	client.ClearArgs()
	client.Args.Set("method", "flickr.auth.oauth.checkToken")
	client.Args.Set("oauth_token", oauthToken)
	client.ApiSign()

	response := &CheckTokenResponse{}
	err := flickr.DoGet(client, response)
	return response, err
}
開發者ID:gloob,項目名稱:gfxBot,代碼行數:13,代碼來源:oauth.go

示例3: Delete

// Delete a photo from Flickr
// This method requires authentication with 'delete' permission.
func Delete(client *flickr.FlickrClient, id string) (*flickr.BasicResponse, error) {
	client.Init()
	client.EndpointUrl = flickr.API_ENDPOINT
	client.HTTPVerb = "POST"
	client.Args.Set("method", "flickr.photos.delete")
	client.Args.Set("photo_id", id)
	client.OAuthSign()

	response := &flickr.BasicResponse{}
	err := flickr.DoPost(client, response)
	return response, err
}
開發者ID:gloob,項目名稱:gfxBot,代碼行數:14,代碼來源:photos.go


注:本文中的github.com/masci/flickr.FlickrClient.EndpointUrl方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。