A "Best of the Best Practices" (BOBP) guide to developing in Python.
- "Build tools for others that you want to be built for you." - Kenneth Reitz
- "Simplicity is alway better than functionality." - Pieter Hintjens
class Endpoint: | |
""" | |
Abstract end point class: this is never used directly. Concrete | |
endpoints inherit from this. | |
""" | |
def __init__(self, headers, request_parameters = None, url_arguments = None): | |
self.url_arguments = url_arguments | |
self.url_initial = self.make_url() | |
self.request_params = request_parameters | |
self.headers = headers |
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
""" | |
Getting Started using the Destiny 2 Api | |
An annotated guide to some of the public endpoints available for examining a user's | |
characters, items, and clan using the Destiny 2 API. You will need to use your api key for | |
this to work. Just insert it as a string where it says <my_api_key> in the beginning. | |
It is broken into four parts: | |
0: Imports, variables, and fixed parameters defined |
RAID STATS : { | |
"allTime": { | |
"activitiesCleared": { | |
"statId": "activitiesCleared", | |
"basic": { | |
"value": 3.0, | |
"displayValue": "3" | |
} | |
}, | |
"activitiesEntered": { |
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
""" | |
Some simple examples of the public endpoints available for examining users, | |
characters, and clans using the Destiny API. | |
You will need to put in your own api key to run it. To learn how go to: | |
http://destinydevs.github.io/BungieNetPlatform/docs/API-Key | |
""" | |
import requests |