圣与圣的连接
steem-connect的Python项目详细描述
#steemconnect
>;steemconnect的第一个python客户端
[如何配置steemconnect v2并将其与应用程序一起使用](https://busy.org/steemconnect/@noisy/how-to-configure-steemconnect-v2-and-use-it-with-your-application-how-it-works-and-how-it-is-different-from-v1)
>;[ann-introduction-python-social-auth-steemconnect-library-integrate-steemconnect-v2-in-your-python-app-in-5分钟-design-pack-as](https://steemit.com/steemconnect/@noisy/ann-introduction-python-social-auth-steemconnect-library-integrate-steemconnect-v2-in-your-python-app-in-5分钟-design-pack-as)
-**如果要查找使用此库的python或django示例,请检查此存储库。**
>;【django-django-django-steem connect】(https://github.com/hakancelik96/django-steemconnect)
【coogger python-upvote bot】(https://github.com/coogger/coogger-python)
//安装
`pip install steem-install steem connect `
/>/>安装
`pip install steem-install steem-connect install-ste>。##如何使用?
steemconnect.operations从steemconnect导入unfollow
。operations从steemconnect导入
。operations从steemconnect导入mute
。operations从steemconnect导入reblog
。operations从steemconnect导入deletecomment
。operations导入claimrewardbalance
来自steemconnect。operations import comment
来自steemconnect。operations import comment options
c=client(client\u id:str,redirect\u url:str,code=false,scope=none)
自定义json,声明奖励余额"
";如果代码为真,则可以使用获取刷新令牌,获取刷新令牌()
c.获取授权url()
c.获取刷新令牌(代码:str,app秘密:str)
c.me(access_-token:str)
````````
-[scopes(scopes)(https://github.com/steemit/steemconnect/wiki/oauth-2 scopes)
-[wiki/oauth-2代码授权流程(wiki/oauth-2代码授权流程](https://github.com/steemit/steememconnect/steemconnect/wiki/oauth-2代码授权流程)
>
vote()方法将对当前用户的指定帖子或评论进行投票:
`` python
vote=vote(投票者:str,作者:str,permlink:str,权重:int)
response=steemconnect(token="your_access_token",data=vote.operation)。如果response.status_code==200:
print("您的帖子upvoted")
``
参数:
-投票者:当前用户的steem用户名。
-作者:文章或评论作者的steem用户名。
-permlink:指向要投票的文章或评论的链接。这是url最后一个"/"之后的部分。例如,本文的"permlink":https://steemit.com/steem/@ned/announcing smart media tokens smts将是"announcing smart media tokens smts"。
-weight:投票权。100等于100%的投票。
==200:
print("您的操作成功")
```
``python
follow=follow(follower:str,following:str)
response=steemconnect(token="您的访问令牌",data=follow.operation).如果response.status\u code==200,则运行
print("您的操作成功了")
````
unfollow=unfollow(follower:str,following:str)
response=steemconnect(token="your_access_token",data=unfollow.operation)。如果response.status_code==200,则运行
print("您的操作成功")
`````
data=mute.operation).如果response.status\u code==200,则运行
print("操作成功")
````
response.status_code==200:
print("您的操作成功了")
````
``python
\comment=comment(parent_author:str,parent_permlink:str,author:str,permlink:str,title:str,body:str,json_metadata:dict)
response=steemconnect(token="your_access_token",data=comment.operation)。如果response.status_code==200,则运行
print("您的操作是成功的")
``````
作者:str,permlink:str,title:str,body:str,json_metadata:dict)
comment_options=commentoptions(
comment_class=comment_class
受益人,
max_accepted_payout:int,默认100000.000
steem美元百分比:int,默认10000
允许投票:bool,bool#默认值为真
允许管理奖励:bool;默认值为真
"受益人示例:
[
{"账户":"coogger.wallet","权重":500},
{"账户":"coogger.pay","权重":500},
{"账户":"hakancelik","weight":500}
]"
print("您的操作成功")
`````
``python
响应=steemconnect(token="您的访问令牌",data=delete_comment.operation).如果response.status_code==200,则运行
print("您的操作成功")
````
=steemconnect(token="your_access_token",data=claim_reward_balance.operation)。如果response.status_code==200,则运行
print("您的操作成功")
````
>;steemconnect的第一个python客户端
[如何配置steemconnect v2并将其与应用程序一起使用](https://busy.org/steemconnect/@noisy/how-to-configure-steemconnect-v2-and-use-it-with-your-application-how-it-works-and-how-it-is-different-from-v1)
>;[ann-introduction-python-social-auth-steemconnect-library-integrate-steemconnect-v2-in-your-python-app-in-5分钟-design-pack-as](https://steemit.com/steemconnect/@noisy/ann-introduction-python-social-auth-steemconnect-library-integrate-steemconnect-v2-in-your-python-app-in-5分钟-design-pack-as)
-**如果要查找使用此库的python或django示例,请检查此存储库。**
>;【django-django-django-steem connect】(https://github.com/hakancelik96/django-steemconnect)
【coogger python-upvote bot】(https://github.com/coogger/coogger-python)
//安装
`pip install steem-install steem connect `
/>/>安装
`pip install steem-install steem-connect install-ste>。##如何使用?
steemconnect.operations从steemconnect导入unfollow
。operations从steemconnect导入
。operations从steemconnect导入mute
。operations从steemconnect导入reblog
。operations从steemconnect导入deletecomment
。operations导入claimrewardbalance
来自steemconnect。operations import comment
来自steemconnect。operations import comment options
c=client(client\u id:str,redirect\u url:str,code=false,scope=none)
自定义json,声明奖励余额"
";如果代码为真,则可以使用获取刷新令牌,获取刷新令牌()
c.获取授权url()
c.获取刷新令牌(代码:str,app秘密:str)
c.me(access_-token:str)
````````
-[scopes(scopes)(https://github.com/steemit/steemconnect/wiki/oauth-2 scopes)
-[wiki/oauth-2代码授权流程(wiki/oauth-2代码授权流程](https://github.com/steemit/steememconnect/steemconnect/wiki/oauth-2代码授权流程)
>
vote()方法将对当前用户的指定帖子或评论进行投票:
`` python
vote=vote(投票者:str,作者:str,permlink:str,权重:int)
response=steemconnect(token="your_access_token",data=vote.operation)。如果response.status_code==200:
print("您的帖子upvoted")
``
参数:
-投票者:当前用户的steem用户名。
-作者:文章或评论作者的steem用户名。
-permlink:指向要投票的文章或评论的链接。这是url最后一个"/"之后的部分。例如,本文的"permlink":https://steemit.com/steem/@ned/announcing smart media tokens smts将是"announcing smart media tokens smts"。
-weight:投票权。100等于100%的投票。
==200:
print("您的操作成功")
```
``python
follow=follow(follower:str,following:str)
response=steemconnect(token="您的访问令牌",data=follow.operation).如果response.status\u code==200,则运行
print("您的操作成功了")
````
unfollow=unfollow(follower:str,following:str)
response=steemconnect(token="your_access_token",data=unfollow.operation)。如果response.status_code==200,则运行
print("您的操作成功")
`````
data=mute.operation).如果response.status\u code==200,则运行
print("操作成功")
````
response.status_code==200:
print("您的操作成功了")
````
``python
\comment=comment(parent_author:str,parent_permlink:str,author:str,permlink:str,title:str,body:str,json_metadata:dict)
response=steemconnect(token="your_access_token",data=comment.operation)。如果response.status_code==200,则运行
print("您的操作是成功的")
``````
作者:str,permlink:str,title:str,body:str,json_metadata:dict)
comment_options=commentoptions(
comment_class=comment_class
受益人,
max_accepted_payout:int,默认100000.000
steem美元百分比:int,默认10000
允许投票:bool,bool#默认值为真
允许管理奖励:bool;默认值为真
"受益人示例:
[
{"账户":"coogger.wallet","权重":500},
{"账户":"coogger.pay","权重":500},
{"账户":"hakancelik","weight":500}
]"
`````
print("您的操作成功")
````
=steemconnect(token="your_access_token",data=claim_reward_balance.operation)。如果response.status_code==200,则运行
print("您的操作成功")
````