Package: piyo
🐣 piyoesa API v1 client library, written in PythonInstallationInstall this library using pip fromPyPIpipinstallpiyoUsage By purposePreparationfrompiyoimportClientclient=Client(access_token='<access_token>',current_team='<team_name>')Search articleSet search keywords and options.See official documents for details:https://docs.esa.io/posts/102#%E8%A8%98%E4%BA%8Bkeywords=["diary","secret"]search_options={"sort":"created"}posts=client.posts(keywords=keywords,search_options=search_options)UsagefrompiyoimportClientclient=Client(access_token='<access_token>',current_team='<team_name>')# Client will look up environment variables "ESA_ACCESS_TOKEN", so you can set access token# to ESA_ACCESS_TOKEN instead of pass it to Client.client.user()#=> GET /v1/userclient.teams()#=> GET /v1/teamsclient.team()#=> GET /v1/teams/<team_name>client.stats()#=> GET /v1/teams/<team_name>/statsclient.members()#=> GET /v1/teams/<team_name>/membersclient.delete_member()#=> DELETE /v1/teams/<team_name>/members/1client.posts(keywords=["diary secret"],search_options={"sort":"created"})#=> GET /v1/teams/<team_name>/postsclient.post(1)#=> GET /v1/teams/<team_name>/posts/1client.create_post({post:{name:"hi!"}})#=> POST /v1/teams/<team_name>/postsclient.update_post(1,{post:{name:"hi!"}})#=> PATCH /v1/teams/<team_name>/posts/1client.delete_post(1)#=> DELETE /v1/teams/<team_name>/posts/1client.comments()#=> GET /v1/teams/<team_name>/commentsclient.comments(1)#=> GET /v1/teams/<team_name>/posts/1/commentsclient.create_comment(1,{"comment":{"body_md":"LGTM!"}})#=> POST /v1/teams/<team_name>/posts/1/commentsclient.update_comment(234,{"comment":{"body_md":"LGTM!"}})#=> PATCH /v1/teams/<team_name>/comments/234client.delete_comment(234)#=> DELETE /v1/teams/<team_name>/comments/234client.comment(234)#=> GET /v1/teams/<team_name>/comments/234client.add_post_star(1)#=> POST /v1/teams/<team_name>/posts/1/starclient.delete_post_star(1)#=> DELETE /v1/teams/<team_name>/posts/1/starclient.stargazers(1)#=> GET /v1/teams/<team_name>/posts/1/stargazersclient.add_comment_star(234)#=> POST /v1/teams/<team_name>/comment/234/starclient.delete_comment_star(234)#=> DELETE /v1/teams/<team_name>/comment/234/starclient.watchers(1)#=> POST /v1/teams/<team_name>/posts/1/watchersclient.add_watch(1)#=> POST /v1/teams/<team_name>/posts/1/watchclient.delete_watch(1)#=> DELETE /v1/teams/<team_name>/posts/1/watchclient.batch_move({})#=> POST /v1/teams/<team_name>/posts/1/watchclient.regenerate_invitation()#=> POST /v1/teams/<team_name>/invitation_regeneratorclient.send_invitation({"member":{"emails":["foo@example.com"]})#=> POST /v1/teams/<team_name>/invitationsclient.delete_invitation("mee93383edf699b525e01842d34078e28")#=> DELETE /v1/teams/<team_name>/invitations/mee93383edf699b525e01842d34078e28client.invitations()#=> GET /v1/teams/<team_name>/invitationsclient.emojis()#=> GET /v1/teams/<team_name>/emojisclient.create_emoji({"emoji":{"code":"funny","image":base64}})#=> POST /v1/teams/<team_name>/emojisclient.delete_emoji("test_emoji")#=> DELETE /v1/teams/<team_name>/emojis/test_emojiDevelopmentissues and pull requests are always welcome!run integration testpython3tests/integration_test.pyrun unit testpython3tests/<test_file>.py-v