当前位置: 首页>>代码示例>>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;未经允许,请勿转载。