Skip to content

Commit 039ae79

Browse files
committed
Create sphinx documentation and autogenerate content from docstrings
1 parent bb7fc9b commit 039ae79

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+19200
-0
lines changed

docs/Makefile

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Minimal makefile for Sphinx documentation
2+
#
3+
4+
# You can set these variables from the command line, and also
5+
# from the environment for the first two.
6+
SPHINXOPTS ?=
7+
SPHINXBUILD ?= sphinx-build
8+
SOURCEDIR = source
9+
BUILDDIR = build
10+
11+
# Put it first so that "make" without argument is like "make help".
12+
help:
13+
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
14+
15+
.PHONY: help Makefile
16+
17+
# Catch-all target: route all unknown targets to Sphinx using the new
18+
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
19+
%: Makefile
20+
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
19.7 KB
Binary file not shown.

docs/build/doctrees/index.doctree

6.32 KB
Binary file not shown.
99.8 KB
Binary file not shown.
2.67 KB
Binary file not shown.

docs/build/html/.buildinfo

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Sphinx build info version 1
2+
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
3+
config: 5a5c2d985228343a48fb9ba7dfcdfca3
4+
tags: 645f666f9bcd5a90fca523b33c5a78b7
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
.. python-loading-sdk documentation master file, created by
2+
sphinx-quickstart on Thu Aug 25 20:46:11 2022.
3+
You can adapt this file completely to your liking, but it should at least
4+
contain the root `toctree` directive.
5+
6+
Welcome to python-loading-sdk's documentation!
7+
==============================================
8+
9+
.. code-block:: python
10+
:caption: Simple example of how to use the SDK.
11+
12+
from loading_sdk import LoadingApiClient
13+
14+
# Creates a client that is authenticated with user credentials.
15+
client = LoadingApiClient(email="example@email.com", password="example_password")
16+
17+
# Requires auth.
18+
profile_data = client.get_profile()
19+
print(profile_data)
20+
21+
# Can be used anonymously.
22+
post_data = client.get_post(post_id="5bb7aac18fef22001d90267b")
23+
24+
if post_data["message"] == "OK":
25+
print(f"post content: {post_data['data']['posts'][0]['body']}")
26+
27+
.. toctree::
28+
:maxdepth: 2
29+
:caption: Contents:
30+
31+
modules
32+
33+
34+
Indices and tables
35+
==================
36+
37+
* :ref:`genindex`
38+
* :ref:`modindex`
39+
* :ref:`search`
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
loading\_sdk package
2+
====================
3+
4+
Submodules
5+
----------
6+
7+
loading\_sdk.api module
8+
-----------------------
9+
10+
.. automodule:: loading_sdk.api
11+
:members:
12+
:undoc-members:
13+
:show-inheritance:
14+
15+
Module contents
16+
---------------
17+
18+
.. automodule:: loading_sdk
19+
:members:
20+
:undoc-members:
21+
:show-inheritance:
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
loading_sdk
2+
===========
3+
4+
.. toctree::
5+
:maxdepth: 4
6+
7+
loading_sdk
Lines changed: 134 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,134 @@
1+
/*
2+
* _sphinx_javascript_frameworks_compat.js
3+
* ~~~~~~~~~~
4+
*
5+
* Compatability shim for jQuery and underscores.js.
6+
*
7+
* WILL BE REMOVED IN Sphinx 6.0
8+
* xref RemovedInSphinx60Warning
9+
*
10+
*/
11+
12+
/**
13+
* select a different prefix for underscore
14+
*/
15+
$u = _.noConflict();
16+
17+
18+
/**
19+
* small helper function to urldecode strings
20+
*
21+
* See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/decodeURIComponent#Decoding_query_parameters_from_a_URL
22+
*/
23+
jQuery.urldecode = function(x) {
24+
if (!x) {
25+
return x
26+
}
27+
return decodeURIComponent(x.replace(/\+/g, ' '));
28+
};
29+
30+
/**
31+
* small helper function to urlencode strings
32+
*/
33+
jQuery.urlencode = encodeURIComponent;
34+
35+
/**
36+
* This function returns the parsed url parameters of the
37+
* current request. Multiple values per key are supported,
38+
* it will always return arrays of strings for the value parts.
39+
*/
40+
jQuery.getQueryParameters = function(s) {
41+
if (typeof s === 'undefined')
42+
s = document.location.search;
43+
var parts = s.substr(s.indexOf('?') + 1).split('&');
44+
var result = {};
45+
for (var i = 0; i < parts.length; i++) {
46+
var tmp = parts[i].split('=', 2);
47+
var key = jQuery.urldecode(tmp[0]);
48+
var value = jQuery.urldecode(tmp[1]);
49+
if (key in result)
50+
result[key].push(value);
51+
else
52+
result[key] = [value];
53+
}
54+
return result;
55+
};
56+
57+
/**
58+
* highlight a given string on a jquery object by wrapping it in
59+
* span elements with the given class name.
60+
*/
61+
jQuery.fn.highlightText = function(text, className) {
62+
function highlight(node, addItems) {
63+
if (node.nodeType === 3) {
64+
var val = node.nodeValue;
65+
var pos = val.toLowerCase().indexOf(text);
66+
if (pos >= 0 &&
67+
!jQuery(node.parentNode).hasClass(className) &&
68+
!jQuery(node.parentNode).hasClass("nohighlight")) {
69+
var span;
70+
var isInSVG = jQuery(node).closest("body, svg, foreignObject").is("svg");
71+
if (isInSVG) {
72+
span = document.createElementNS("http://www.w3.org/2000/svg", "tspan");
73+
} else {
74+
span = document.createElement("span");
75+
span.className = className;
76+
}
77+
span.appendChild(document.createTextNode(val.substr(pos, text.length)));
78+
node.parentNode.insertBefore(span, node.parentNode.insertBefore(
79+
document.createTextNode(val.substr(pos + text.length)),
80+
node.nextSibling));
81+
node.nodeValue = val.substr(0, pos);
82+
if (isInSVG) {
83+
var rect = document.createElementNS("http://www.w3.org/2000/svg", "rect");
84+
var bbox = node.parentElement.getBBox();
85+
rect.x.baseVal.value = bbox.x;
86+
rect.y.baseVal.value = bbox.y;
87+
rect.width.baseVal.value = bbox.width;
88+
rect.height.baseVal.value = bbox.height;
89+
rect.setAttribute('class', className);
90+
addItems.push({
91+
"parent": node.parentNode,
92+
"target": rect});
93+
}
94+
}
95+
}
96+
else if (!jQuery(node).is("button, select, textarea")) {
97+
jQuery.each(node.childNodes, function() {
98+
highlight(this, addItems);
99+
});
100+
}
101+
}
102+
var addItems = [];
103+
var result = this.each(function() {
104+
highlight(this, addItems);
105+
});
106+
for (var i = 0; i < addItems.length; ++i) {
107+
jQuery(addItems[i].parent).before(addItems[i].target);
108+
}
109+
return result;
110+
};
111+
112+
/*
113+
* backward compatibility for jQuery.browser
114+
* This will be supported until firefox bug is fixed.
115+
*/
116+
if (!jQuery.browser) {
117+
jQuery.uaMatch = function(ua) {
118+
ua = ua.toLowerCase();
119+
120+
var match = /(chrome)[ \/]([\w.]+)/.exec(ua) ||
121+
/(webkit)[ \/]([\w.]+)/.exec(ua) ||
122+
/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua) ||
123+
/(msie) ([\w.]+)/.exec(ua) ||
124+
ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua) ||
125+
[];
126+
127+
return {
128+
browser: match[ 1 ] || "",
129+
version: match[ 2 ] || "0"
130+
};
131+
};
132+
jQuery.browser = {};
133+
jQuery.browser[jQuery.uaMatch(navigator.userAgent).browser] = true;
134+
}

0 commit comments

Comments
 (0)