Skip to content

fspv/python-leetcode

Repository files navigation

swagger-client

This is a simple API

This Python package is automatically generated by the Swagger Codegen project:

  • API version: 1.0.0-oas3
  • Package version: 1.0.0
  • Build package: io.swagger.codegen.v3.generators.python.PythonClientCodegen

Requirements.

Python 2.7 and 3.4+

Installation & Usage

pip install

If the python package is hosted on Github, you can install directly from Github

pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git

(you may need to run pip with root permission: sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git)

Then import the package:

import swagger_client 

Setuptools

Install via Setuptools.

python setup.py install --user

(or sudo python setup.py install to install the package for all users)

Then import the package:

import swagger_client

Getting Started

Please follow the installation procedure and then run the following:

from __future__ import print_function
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: cookieCSRF
configuration = swagger_client.Configuration()
configuration.api_key['csrftoken'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['csrftoken'] = 'Bearer'
# Configure API key authorization: cookieSession
configuration = swagger_client.Configuration()
configuration.api_key['LEETCODE_SESSION'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['LEETCODE_SESSION'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.DefaultApi(swagger_client.ApiClient(configuration))

try:
    api_response = api_instance.problems_algorithms_get()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->problems_algorithms_get: %s\n" % e)

Documentation for API Endpoints

All URIs are relative to https://leetcode.com/api

Class Method HTTP request Description
DefaultApi problems_algorithms_get GET /problems/algorithms/

Documentation For Models

Documentation For Authorization

cookieCSRF

  • Type: API key
  • API key parameter name: csrftoken
  • Location: URL query string

cookieSession

  • Type: API key
  • API key parameter name: LEETCODE_SESSION
  • Location: URL query string

Author

pv.safronov@gmail.com

About

python client for leetcode api

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  

Languages