Skip to main content

SDK for ooti

Project description


Logo

SDK OOTI

Explore the docs »
ooti.co

Table of Contents
  1. About The Project
  2. Getting Started
  3. How to use
  4. License

About The Project

This sdk is for all people wanting to use the ooti API

Built With

Getting Started

Prerequisites

Installation

In case you work with virtuel environment you could, add ooti-api in your requirements.

Run the following command to install package ooti-api:

   pip install ooti-api

How to use

  1. Import
    import sdk_ooti
    
  2. Connect to the API
    my_account = sdk_ooti.OotiAPI('email', 'password')
    my_account.connect()
    
  3. Do a request
    invoices = my_account.get_invoices_list()
    

Example

import ooti
import pprint


###### Connect ######
my_account = ooti.OotiAPI('email', 'password')
my_account.connect()


###### Invoice ######
invoices = my_account.get_invoices_list()  # Get the list of invoices
for invoice in invoices:
    pprint.pp(invoice)  # Print each invoice

invoice = my_account.get_invoice_details(pk='invoice_pk')  # Get the details of one invoice
for line in invoice['items']:
    pprint.pp(line)  # Print each lines of the invoice

payload = {
    "amount": 1000,
}
invoice = my_account.create_invoice(1499, payload)  # Create an invoice
pprint.pp(invoice)

payload = {
    "amount": 3000,
}
invoice = my_account.update_invoice(pk='invoice_pk', payload)  # updatee an invoice
pprint.pp(invoice)

###### Payment ######
payments = my_account.get_payments_list()  # Get the list of payments
for payment in payments:
    pprint.pp(payment)  # Print each payment

payment = my_account.get_payment_details(pk='payment_pk')  # Get the details of one payment
pprint.pp(payment)

payload = {
    "amount": 1000,
}
payment = my_account.create_payment(1499, payload)  # Create an payment
pprint.pp(payment)

payload = {
    "amount": 3000,
}
payment = my_account.update_payment(pk='payment_pk', payload)  # updatee an payment
pprint.pp(payment)

###### Project ######
projects = my_account.get_projects_list()  # Get the list of projects
for project in projects:
    pprint.pp(project)  # Print each project

project = my_account.get_project_details(pk='invoice_pk')  # Get the details of one project
pprint.pp(project)  # Print details of the project

data = {
    'business_title': 'new_title'
}
project = my_account.update_project_details(pk='invoice_pk', data=data)  # Update the details of one project
pprint.pp(project)  # Print details of the updated project


###### Phase ######
phases = my_account.get_phases_list(project_pk='invoice_pk')  # Get the list of phases
for phase in phases:
    pprint.pp(phase)  # Print each phase

phase = my_account.get_phase_details(pk='phase_pk')  # Get the details of one phase
pprint.pp(phase)  # Print details of the phase

data = {'progress': 66}
phase = my_account.update_phase_details(pk='phase_pk', data=data)  # Update the details of one phase
pprint.pp(phase)  # Print details of the updated phase

License

Copyright (C) 2016-2021 AxonePro S.A.S. legal@ooti.co All Rights Reserved

This file is part of axonepro.com.

Unauthorized copying of any file in this project, via any medium is strictly prohibited. Proprietary and confidential

axonepro.com can not be copied and/or distributed without the express permission of AXONEPRO.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ooti-api-1.0.1.tar.gz (41.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ooti_api-1.0.1-py3-none-any.whl (66.5 kB view details)

Uploaded Python 3

File details

Details for the file ooti-api-1.0.1.tar.gz.

File metadata

  • Download URL: ooti-api-1.0.1.tar.gz
  • Upload date:
  • Size: 41.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.0 importlib_metadata/4.8.1 packaging/21.0 pkginfo/1.7.1 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.7.7

File hashes

Hashes for ooti-api-1.0.1.tar.gz
Algorithm Hash digest
SHA256 6624d86c06301924b1d82405b7dc7a95de3b8c0562f2f7088605a62f051041c5
MD5 c718fffbe9b85fc21c76380b08e5e0b4
BLAKE2b-256 755c399cafa35b3dd57d25b64c10b11cfd3ea44590d3300d58e950ef91a4aedd

See more details on using hashes here.

File details

Details for the file ooti_api-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: ooti_api-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 66.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.0 importlib_metadata/4.8.1 packaging/21.0 pkginfo/1.7.1 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.7.7

File hashes

Hashes for ooti_api-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0ef3c2ef9ce0580ed7370fb864a2a379d56f43a9e7af816e3766fccf9fcbb8a9
MD5 00ebbb3817da5ec6535c870894007c12
BLAKE2b-256 c0d571e93c443343b57aba4d0c49400c8f0614ec058fcaf806f50edfaf20a3cc

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page