rgb note api的python绑定
rgbnotes的Python项目详细描述
#rgb notes python库
[![Circleci](https://circleci.com/gh/rgbnotes/rgb-api-python.svg?style=svg)(https://circleci.com/gh/rgb notes/rgb-api-python)
rgb-notes-python库提供了从用python语言编写的应用程序访问rgb-notes-api的方便。它包括一组预定义的api资源类。
section=api)。
如果你只是想使用这个软件包,运行:
```{.sourcecode.bash}
pip install--upgragrargbnotes
````
>从源代码安装:从源代码安装:
``````{.sourcecode.bash}
python setup.pypyinstall
````
>
>*python 2.6+或pytho3.3+(支持pypypypypypypypy3.3+(支持pypypypypypypypypypypy3.3+(支持pypypypypypypypypypypypypypypypypypypypypy(支持py py)
需要使用您的帐户密钥进行配置,该密钥在[rgb notes settings]中可用(https://rgbnotes.com/login.php)?r=/settings.php)。
请参阅api
文档,了解范围
rgbnotes.token.client()
rgbnotes.token.project(project_id=2,客户机id=7)
```
\api方法
所有方法都封装在它自己的类中。
类上使用的方法名是:
````{.sourcecode.python}
cls.create()
cls.list()
cls.retrieve(id)
cls.modify(id,**数据)
cls.delete(id)
```
projects request
`````{.sourcecode.python}
rgbnotes.project.create(title=“new project”)
rgbnotes.project.list()
rgbnotes.project.modify(2,
rgbnotes.project.delete(2)
````
资产申请
````````{.sourcecode.python}
`````````````{.sourcecode.python需要一个项目令牌或项目id参数
rgbnotes.asset.asset.list()
>rgbnotes.asset.asset.asset.asset.list()
>rgbnotes.asset.asset.asset.asset.create(title=“newasset”)
>rgbnotes.asset.asset.asset.ass
注释请求需要一个项目令牌或项目id参数
rgbnotes.note.list()
````
rgbnotes.user请求
````{.sourcecode.python}
rgbnotes.user.create(name=“john doe”,email=“john@doe.com”)
rgbnotes.user.list()
````
文件请求
````{.sourcecode.python}
fp=open(“/path/to/file”,"rb")
rgbnotes.File.create(file=fp)
rgbnotes.File.list()
```
## Snapshot Request
``` {.sourceCode .python}
rgbnotes.Snapshot.retrieve(id)
```
## Account Request
``` {.sourceCode .python}
rgbnotes.Account.retrieve()
```
## Alias Request
``` {.sourceCode .python}
rgbnotes.alias.list()
rgbnotes.alias.create(实体类型='projects',
entity id=4,
alias=123)
rgbnotes.alias.modify(id,别名(id)
rgbnotes.alias.delete(id)
```
webhook请求
`````````````````````````````````````````````````````````````````` webhook.webhook.webhook.modify(url=“http://myurl.com/webhook/webhook/webhook.com/webhook``````````````````````````
[![Circleci](https://circleci.com/gh/rgbnotes/rgb-api-python.svg?style=svg)(https://circleci.com/gh/rgb notes/rgb-api-python)
rgb-notes-python库提供了从用python语言编写的应用程序访问rgb-notes-api的方便。它包括一组预定义的api资源类。
section=api)。
如果你只是想使用这个软件包,运行:
```{.sourcecode.bash}
pip install--upgragrargbnotes
````
>从源代码安装:从源代码安装:
``````{.sourcecode.bash}
python setup.pypyinstall
````
>
>*python 2.6+或pytho3.3+(支持pypypypypypypypy3.3+(支持pypypypypypypypypypypy3.3+(支持pypypypypypypypypypypypypypypypypypypypypy(支持py py)
需要使用您的帐户密钥进行配置,该密钥在[rgb notes settings]中可用(https://rgbnotes.com/login.php)?r=/settings.php)。
请参阅api
文档,了解范围
rgbnotes.token.client()
rgbnotes.token.project(project_id=2,客户机id=7)
```
\api方法
所有方法都封装在它自己的类中。
类上使用的方法名是:
````{.sourcecode.python}
cls.create()
cls.list()
cls.retrieve(id)
cls.modify(id,**数据)
cls.delete(id)
```
projects request
`````{.sourcecode.python}
rgbnotes.project.create(title=“new project”)
rgbnotes.project.list()
rgbnotes.project.modify(2,
rgbnotes.project.delete(2)
````
资产申请
````````{.sourcecode.python}
`````````````{.sourcecode.python需要一个项目令牌或项目id参数
rgbnotes.asset.asset.list()
>rgbnotes.asset.asset.asset.asset.list()
>rgbnotes.asset.asset.asset.asset.create(title=“newasset”)
>rgbnotes.asset.asset.asset.ass
注释请求需要一个项目令牌或项目id参数
rgbnotes.note.list()
````
rgbnotes.user请求
````{.sourcecode.python}
rgbnotes.user.create(name=“john doe”,email=“john@doe.com”)
rgbnotes.user.list()
````
文件请求
````{.sourcecode.python}
fp=open(“/path/to/file”,"rb")
rgbnotes.File.create(file=fp)
rgbnotes.File.list()
```
## Snapshot Request
``` {.sourceCode .python}
rgbnotes.Snapshot.retrieve(id)
```
## Account Request
``` {.sourceCode .python}
rgbnotes.Account.retrieve()
```
## Alias Request
``` {.sourceCode .python}
rgbnotes.alias.list()
rgbnotes.alias.create(实体类型='projects',
entity id=4,
alias=123)
rgbnotes.alias.modify(id,别名(id)
rgbnotes.alias.delete(id)
```
webhook请求
`````````````````````````````````````````````````````````````````` webhook.webhook.webhook.modify(url=“http://myurl.com/webhook/webhook/webhook.com/webhook``````````````````````````