GithubHelp home page GithubHelp logo

blimp-python's Introduction

blimp-python

Build Status

This library allows you to interact with the Blimp API using Python. You can find more information about Blimp's Public API documentation at http://dev.getblimp.com/. If you have any problems or requests please contact [support](mailto:[email protected]?subject=Blimp API Python library).

Inspired by Mike Lewis' Python Foursquare v2 library.

License

Licensed under the MIT License.

Install

Using Github:

git clone [email protected]:getblimp/blimp-python.git

Using pip:

pip install blimp

Using easy_install:

easy_install blimp

Pre-Usage

Before we begin using the library you need to signup to Blimp and generate a new API Key if you don't have one in your settings as well as an Application ID and Secret in your applications.

Usage

import blimp

api = blimp.Client('username', 'api_key', 'app_id', 'app_secret')

# get all companies that I'm part of
companies = api.company()

# get one company by id
company = api.company(1)

# get all projects for one company
projects = api.project(params={'company': 1})

# get count of total projects
total_projects = projects['meta']['total_count']

# Loop through all projects and print their name
for project in projects['objects']:
    print project['name']

# Get all goals for a project
goals = api.goal(params={'project': 1})

# Get all tasks for a goal
tasks = api.task(params={'goal': 1})

# Get all comments for a task
comments = api.comment(params={'content_type': 'todo', 'object_pk': 1})

# Get schema for all available endpoints
print api.company.schema()
print api.project.schema()
print api.goal.schema()
print api.task.schema()
print api.comment.schema()
print api.file.schema()

# All available methods per endpoint
# api.task.get()
# api.task.get(task_id)
# api.task.create(data)
# api.task.update(task_id, data)
# api.task.delete(task_id)
# api.task.schema()

Example response of all companies I'm part of

{
    "meta": {
        "limit": 20,
        "next": null,
        "offset": 0,
        "previous": null,
        "total_count": 1
    },
    "objects": [
        {
            "company_users": [
                {
                    "accepted_invitation": true,
                    "date_created": "2012-11-01T00:00:00",
                    "date_modified": "2012-11-27T02:22:09.817265",
                    "id": 38,
                    "is_active": true,
                    "role": "admin",
                    "user": "/api/v2/user/3/"
                },
                {
                    "accepted_invitation": true,
                    "date_created": "2012-11-01T00:00:00",
                    "date_modified": "2012-11-27T02:22:09.705959",
                    "id": 37,
                    "is_active": true,
                    "role": "admin",
                    "user": "/api/v2/user/2/"
                },
                {
                    "accepted_invitation": true,
                    "date_created": "2012-11-01T00:00:00",
                    "date_modified": "2012-11-27T02:22:09.380851",
                    "id": 39,
                    "is_active": true,
                    "role": "owner",
                    "user": "/api/v2/user/1/"
                }
            ],
            "date_created": "2012-11-01T00:00:00",
            "date_modified": "2012-12-21T21:57:09.965247",
            "id": 1,
            "image_url": "",
            "name": "Blimp",
            "resource_uri": "/api/v2/company/1/",
            "slug": "blimp",
            "used_projects": 0,
            "used_storage": "4929882"
        }
    ]
}

Improvements

What else would you like this library to do? Let me know. Feel free to send pull requests for any improvements you make.

Todo

  • Tests

blimp-python's People

Contributors

jpadilla avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

chrisrodz

blimp-python's Issues

Example of creating a new task available?

I'm looking into your API to integrate it with a django CRM project. For evert lead generated by the website, I'd like to create a new task in a Blimp project. Looked around your docs, and I see there is a method available to create the task. Though I did not find an example of how to use it. May you share some examples? Including (but not limited to) the JSON structure the API expects.

Thank you. (:

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.