Skip to main content

SDK for ooti

Project description

Build Status


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 ooti.ooti as ooti
    
  2. Connect to the API
    my_account = ooti.OotiAPI('email', 'password')
    my_account.connect()
    
  3. Do a request
    invoices = my_account.get_invoices_list()
    

Example

import ooti.ooti as ooti
import pprint


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


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

invoice = my_account.Invoices.get_invoice_details(pk='invoice_pk')  # Get the details of one invoice
if(invoice['status']==404):
    print('check the pk as it must be false')
else:
    pprint.pp(invoice['data'])  #Print details of the invoice

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

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

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

payment = my_account.Payments.get_payment_details(pk='payment_pk')  # Get the details of one payment
if(payment['status']==404):
    print('check the pk as it must be false')
else:
    pprint.pp(payment['data'])  #Print details of the payment

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

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

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

project = my_account.Projects.get_project_details(id='project_id')  # Get the details of one project
if(project['status']==404):
    print('check the id as it must be false')
else:
    pprint.pp(project['data'])  #Print details of the project

data = {
    'business_title': 'new_title'
}
project = my_account.Projects.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.Phases.get_phases_list(project_pk='project_id')  # Get the list of phases for one project
for phase in phases['data']:
    pprint.pp(phase)  # Print each phase

phase = my_account.Phases.get_phase_details(pk='phase_id')  # Get the details of one phase
if(phase['status']==404):
    print('check the id as it must be false')
else:
    pprint.pp(phase['data']) #Print details of the phase

data = {'progress': 66}
phase = my_account.Phases.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-2022 AxonePro S.A.S. info@ooti.co All Rights Reserved

This file is part of ooti.co.

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.3.tar.gz (37.9 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.3-py3-none-any.whl (66.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ooti-api-1.0.3.tar.gz
  • Upload date:
  • Size: 37.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.8.2

File hashes

Hashes for ooti-api-1.0.3.tar.gz
Algorithm Hash digest
SHA256 48b91a7260759252ab77df171d98ff07303fa6fc2823d18b5e4fd9224220fbb8
MD5 fd4a4ea1524e4003573c97bd5b00f05d
BLAKE2b-256 d6688df8f9ebc9ef9535b7355f334ea301c2e6f96d78ae67673a4188020f0b80

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ooti_api-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 66.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.8.2

File hashes

Hashes for ooti_api-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 928493b5cdc35221157d8ffadf8a8d39e0ae07cdcb48fe4f3d85a0576fbed928
MD5 67ae1eb7486d32df0d7137296c10b226
BLAKE2b-256 fcb7b7bf782a5108039749baf3b8f27007c715efccb1a97ba3f11af9e0025d00

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