Coder Social home page Coder Social logo

podio-python's Introduction

podio-python

podio-python is an API wrapper for Podio, written in Python.
This library uses Oauth2 for authentication.

Installing

pip install podio-python

Usage

# if you have an access token:
from podio.client import Client
client = Client(access_token=access_token)
# if you are using Oauth2 to get an access_token:
from podio.client import Client
client = Client(client_id=client_id, client_secret=client_secret, redirect_uri=redirect_uri)

To obtain and set an access token:

  1. Get authorization URL
url = client.authorization_url(state=None)
  1. Get access token using code
response = client.get_access_token(code)
  1. Set access token
client.set_token(access_token)

Check more information about Podio Oauth: https://developers.podio.com/authentication/server_side

Refresh token

If your access token expired you can use your refresh token to obtain a new one:

token = client.refresh_token(refresh_token)
# And then set your token again:
client.set_token(token["access_token"])

Get user status

user = client.get_user_status()

Organizations

List organizations

orgs = client.list_organizations()

List organization spaces

spaces = client.get_organization_spaces(org_id)

Get space

spaces = client.get_space(space_id)

List space members

members = client.get_space_members(space_id)

Applications

List applications

apps = client.list_applications()

Get application

app = client.get_application(app_id)

Get item

item = client.get_item(item_id)

Create item

body = {"fields": {"title": "Juan Assignment", "status": 1}}
item = client.create_item(app_id, body)

Get task

task = client.get_task(task_id)

Create task

body = {"text": "Text of the task", "description": "desc"}
task = client.create_task(body)

Get task labels

labels = client.get_task_labels()

Webhooks

List webhooks

hooks = client.list_webhooks(ref_type, ref_id)

Create webhook

hook = client.create_webhook(ref_type, ref_id, url, hook_type)

Validate hook verification

client.validate_hook_verification(webhook_id, code)

Delete webhook

client.delete_webhook(webhook_id)

podio-python's People

Contributors

juanrios15 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.