Socket
Socket
Sign inDemoInstall

ButtonRequest-APIv1

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ButtonRequest-APIv1

Button Request API v1 for Python


Maintainers
1

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

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc