Skip to content

Latest commit

 

History

10 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

blockscore-python

Official BlockScore API library client for python

This library is generated by alpaca

Installation

Make sure you have pip installed

$ pip install blockscore

Versions

Works with [ 2.6 / 2.7 / 3.2 / 3.3 ]

Usage

import block_score

# Then we instantiate a client (as shown below)

Build a client

Without any authentication
client = block_score.Client()

# If you need to send options
client = block_score.Client({}, options)
Basic authentication
auth = { 'username': 'pksunkara', 'password': 'password' }

client = block_score.Client(auth, options)

Response information

response = client.klass('args').method('args')

response.body
# >>> 'Hello world!'

response.code
# >>> 200

response.headers
# >>> {'content-type': 'text/html'}
HTML response
response.body
# >>> 'The username is pksunkara!'
JSON response
response.body
# >>> {'user': 'pksunkara'}

Request body information

RAW request
body = 'username=pksunkara'
FORM request
body = {'user': 'pksunkara'}
JSON request
body = {'user': 'pksunkara'}

Client Options

The following options are available while instantiating a client:

  • base: Base url for the api
  • api_version: Default version of the api (to be used in url)
  • user_agent: Default user-agent for all requests
  • headers: Default headers for all requests
  • request_type: Default format of the request body

Method Options

The following options are available while calling a method of an api:

  • api_version: Version of the api (to be used in url)
  • headers: Headers for the request
  • query: Query parameters for the url
  • body: Body of the request
  • request_type: Format of the request body

Verifications api

Returns user api instance

verifications = client.verifications("")
(POST /verifications)

The following arguments are required:

  • type:
  • date_of_birth:
  • identification:
  • name:
  • address:
response = verifications.new("", "", "", "", "", options)
Retrieve a verification (GET /verifications/:id)

The following arguments are required:

  • id:
response = verifications.retrieve("", options)
List verifications (GET /verifications)

The following arguments are required:

response = verifications.list("", "", options)

api

questions = client.questions()
(POST /questions)

The following arguments are required:

  • verification_id:
response = questions.new("", options)
(POST /questions/score)

The following arguments are required:

  • verification_id:
  • question_set_id:
  • answers:
response = questions.score("", "", "", options)

Contributors

Here is a list of Contributors

TODO

License

MIT

Bug Reports

Report here.

Contact

John Backus ([email protected])

About

An API wrapper for the BlockScore API using Python.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages