Skip to main content

Button Request API v1 for Python

Project description

Button API V1 Library for Python

This Python library enables you to use the API effectively.

Installation

To install use this library, you may install it with PyPi.

Open the Terminal and navigate to the folder you desire. Then type,

pip install ButtonRequest-APIv1

How to use?

To use that, you must first declare the following,

from ButtonRequest.APIv1 import apiClient
client = apiClient("{API Token}")

Message

Fetch

response = client.message.fetch()

You may also add filter conditions,

response = client.message.fetch(filterDict={
    "msg_id":"{Msg ID}",
    "device_id":"{Device ID}",
    "pin":"{Pin Status}",
    "shared_to_me":"{Shared To Me}"
})

Eligible Filter Parameters: msg_id, device_id, pin, shared_to_me

Pin Status

response = client.message.pinStatus("{Message ID}", "{Pin or Unpin}")

Delete

response = client.message.delete("{Message ID}")

DeviceList

Fetch

response = client.deviceList.fetch()

You may also add filter,

response = client.deviceList.fetch("{Device ID}",
    {
        "status":"{Status}",
        "repeated_message":"{Repeated Message}",
    }
);

Eligible Filter Parameters: status, repeated_message

Repeated Message

response = client.deviceList.repeatedMessage("{Device Id}", "{Action}")

Button Message Update

response = client.deviceList.buttonMessageUpdate("{Device Id}", 
    [
        {
            "buttonNo": "1", "message": "This is First Button"
        },
        {
            "buttonNo": "2", "message": "This is Second Button"
        }
    ]
)

Button Message Delete

response = client.deviceList.buttonMessageDelete("{Device Id}", 
    [
        "{Button No 1}", "{Button No 2}"
    ]
)

New Device

response = client.deviceList.newDevice("{Nickname}")

Device Share

Fetch Shared To Me

response = client.deviceShare.toMeFetch()

You may also pass filter array,

response = client.deviceShare.toMeFetch({
    "case_id":"{Case ID}",
    "device_id":"{Device ID}",
    "owner_email":"{Email}",
    "right":"{Right}" 
})

Eligible Parameter: case_id, device_id, owner_email, right

Give Up Sharee Right

response = client.deviceShare.giveUpShareeRight("{Case ID}")

Share To

response = client.deviceShare.shareTo("{Device ID}", "{Email}")

Change Sharee Right

response = client.deviceShare.changeShareeRight("{Case ID}", "{Right}")

Mobile Access

Fetch

response = client.mobileAccess.fetch()

You may also pass filter array.

response = client.mobileAccess.fetch(
    {
        "case_id":"{Case ID}",
        "deleted_from_phone":"{Deleted or Not}"
    }
)

Eligible Parameter: case_id, deleted_from_phone

New

response = client.mobileAccess.new("{Nickname}")

Amend Nickname

response = client.mobileAccess.amendNickname("{Case ID}", "{New Nickname}")

Revoke

response = client.mobileAccess.revoke("{CASE ID}")

Response

Please refer to the API documentation

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

ButtonRequest-APIv1-1.0.2.tar.gz (5.4 kB view details)

Uploaded Source

Built Distribution

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

ButtonRequest_APIv1-1.0.2-py3-none-any.whl (6.8 kB view details)

Uploaded Python 3

File details

Details for the file ButtonRequest-APIv1-1.0.2.tar.gz.

File metadata

  • Download URL: ButtonRequest-APIv1-1.0.2.tar.gz
  • Upload date:
  • Size: 5.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.12

File hashes

Hashes for ButtonRequest-APIv1-1.0.2.tar.gz
Algorithm Hash digest
SHA256 d215b1e9cb8bb7ce00e88699df5e14acd1327d376bb1a67d5d8298ca0aa5bfa0
MD5 a852f47c24af3502985b3669b10f7d34
BLAKE2b-256 f4dc92f3ec37033daafd624da74b0324338e86066b777a54debc0c5026c042c0

See more details on using hashes here.

File details

Details for the file ButtonRequest_APIv1-1.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for ButtonRequest_APIv1-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 dec5ab6e7bc3b062bba5ba4746ba42a780de3cceaee42ca79420baed8be7e995
MD5 a95f5305bdcd3b36106465553d78d216
BLAKE2b-256 05d9e52e4287cb9a55e2dd6aacf7e7f11b091db881c7ff00523a16606a73890a

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