Skip to main content

An API library for BaiduNetdisk

Project description

BaiduNetdisk OpenAPI Client

An API library for BaiduNetdisk

Generated by: https://openapi-generator.tech

Library Struct

xpan
│  api_client.py
│  configuration.py
│  exceptions.py
│  model_utils.py
│  rest.py
│  __init__.py
│
├─api
│      auth_api.py
│      fileinfo_api.py
│      filemanager_api.py
│      fileupload_api.py
│      multimediafile_api.py
│      userinfo_api.py
│      __init__.py
│
└─model
        oauth_token_authorization_code_response.py
        oauth_token_device_code_response.py
        oauth_token_device_token_response.py
        oauth_token_refresh_token_response.py
        quotaresponse.py
        uinforesponse.py
        __init__.py

Example

import os,sys
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
sys.path.append(BASE_DIR)
import xpan
from xpan.api import userinfo_api
from xpan.model.quotaresponse import Quotaresponse
from xpan.model.uinforesponse import Uinforesponse
from pprint import pprint

def user_quota():
    """
    user_quota demo
    """
    # Enter a context with an instance of the API client
    with xpan.ApiClient() as api_client:
        # Create an instance of the API class
        api_instance = userinfo_api.UserinfoApi(api_client)
        access_token = "123.56c5d1f8eedf1f9404c547282c5dbcf4.YmmjpAlsjUFbPly3mJizVYqdfGDLsBaY5pyg3qL.a9IIIQ" # str | 
        checkexpire = 1 # int |  (optional)
        checkfree = 1 # int |  (optional)

        # example passing only required values which don't have defaults set
        # and optional values
        try:
            api_response = api_instance.apiquota(access_token, checkexpire=checkexpire, checkfree=checkfree)
            pprint(api_response)
        except xpan.ApiException as e:
            print("Exception when calling UserinfoApi->apiquota: %s\n" % e) 


def user_info():
    """
    user_info demo
    """
    # Enter a context with an instance of the API client
    with xpan.ApiClient() as api_client:
        # Create an instance of the API class
        api_instance = userinfo_api.UserinfoApi(api_client)
        access_token = "123.56c5d1f8eedf1f9404c547282c5dbcf4.YmmjpAlsjUFbPly3mJizVYqdfGDLsBaY5pyg3qL.a9IIIQ" # str | 

        # example passing only required values which don't have defaults set
        try:
            api_response = api_instance.xpannasuinfo(access_token)
            pprint(api_response)
        except xpan.ApiException as e:
            print("Exception when calling UserinfoApi->xpannasuinfo: %s\n" % e)

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

xpan-0.0.1.tar.gz (44.6 kB view details)

Uploaded Source

File details

Details for the file xpan-0.0.1.tar.gz.

File metadata

  • Download URL: xpan-0.0.1.tar.gz
  • Upload date:
  • Size: 44.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.6

File hashes

Hashes for xpan-0.0.1.tar.gz
Algorithm Hash digest
SHA256 3e3249166717b70ef22f35f9e38326a31ef9455a269ecbcd17b0399523dd8b85
MD5 008f08b121dc7a1cd3bc6c020d91076e
BLAKE2b-256 5cd6cf82e1546a1c6b95241c927d5c10870b250a1c7c410ad758a02ba37a2964

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