Skip to content

Commit

Permalink
document models
Browse files Browse the repository at this point in the history
  • Loading branch information
jensens committed Nov 3, 2023
1 parent d9f7197 commit 27eff6a
Show file tree
Hide file tree
Showing 4 changed files with 303 additions and 38 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
venv/
build/
.DS_Store
**/_autosummary/*
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ pydata_sphinx_theme
sphinx-copybutton
sphinxcontrib-mermaid
sphinx-autobuild
autodoc_pydantic
git+https://github.com/edutap-eu/edutap.wallet_google.git@main
2 changes: 2 additions & 0 deletions source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@
"sphinxcontrib.mermaid",
"sphinx.ext.todo",
"sphinx.ext.autodoc",
"sphinx.ext.autosummary",
"sphinxcontrib.autodoc_pydantic",
]

# Add any paths that contain templates here, relative to this directory.
Expand Down
337 changes: 299 additions & 38 deletions source/packages/edutap_wallet_google/reference.md
Original file line number Diff line number Diff line change
@@ -1,71 +1,332 @@
# Reference

## API Documentation

## Overview
## API Functions

Most tasks are done by import and using the sole `api` module:

```python
from edutap.wallet_google import api
```

The `api` module has the functions:

- [`api.create`](#edutap.wallet_google.api.create)
- [`api.read`](#edutap.wallet_google.api.read)
- [`api.update`](#edutap.wallet_google.api.update)
- [`api.disable`](#edutap.wallet_google.api.disable)
- [`api.message`](#edutap.wallet_google.api.message)
- [`api.listing`](#edutap.wallet_google.api.listing)
- [`api.save_link`](#edutap.wallet_google.api.save_link)

To tell the API functions what kind of item to deal with, the first parameter is the registered name of the model (except for `save_link`).
Models can be the different top-level wallet-classes or -objects, but also issuers, permissions and such (see section models below).

Models can be the different wallet-classes or -objects, but also issuers, permissions and such (see section models below).
```{eval-rst}
.. currentmodule:: edutap.wallet_google.api
## API Functions
.. autosummary::
:toctree: _autosummary
```{eval-rst}
.. autofunction:: edutap.wallet_google.api.create
create
read
update
disable
message
listing
save_link
```

```{eval-rst}
.. autofunction:: edutap.wallet_google.api.read
```
## Models

```{eval-rst}
.. autofunction:: edutap.wallet_google.api.update
```
### Top Level Models

```{eval-rst}
.. autofunction:: edutap.wallet_google.api.disable
```
```{eval-rst}
.. autofunction:: edutap.wallet_google.api.message
```
.. rubric:: Generic
`edutap.wallet_google.models.generic`
.. currentmodule:: edutap.wallet_google.models.generic
.. autosummary::
:toctree: _autosummary
GenericClass
GenericObject
.. rubric:: Retail
`edutap.wallet_google.models.retail`
.. currentmodule:: edutap.wallet_google.models.retail
.. autosummary::
:toctree: _autosummary
GiftCardClass
GiftCardObject
LoyaltyClass
LoyaltyObject
OfferClass
OfferObject
.. rubric:: Ticket and Transit
`edutap.wallet_google.models.tickets_and_transit`
.. currentmodule:: edutap.wallet_google.models.tickets_and_transit
.. autosummary::
:toctree: _autosummary
EventTicketClass
EventTicketObject
.. rubric:: Issuer
`edutap.wallet_google.models.issuer`
.. currentmodule:: edutap.wallet_google.models.issuer
.. autosummary::
:toctree: _autosummary
Issuer
Permissions
SmartTap
.. rubric:: JWT
`edutap.wallet_google.models.jwt`
.. currentmodule:: edutap.wallet_google.models.jwt
.. autosummary::
:toctree: _autosummary
JwtResource
JwtResponse
Resources
```{eval-rst}
.. autofunction:: edutap.wallet_google.api.listing
```

### Data-Types

```{eval-rst}
.. autofunction:: edutap.wallet_google.api.save_link
```
## Models
.. currentmodule:: edutap.wallet_google.models.retail
```{todo}
.. rubric:: Retail
Create a Sphinx plugin to document the pydantic models of `edutap.wallet_google`.
`edutap.wallet_google.models.retail`
```
.. autosummary::
:toctree: _autosummary
### Top Level Models
LoyaltyPointsBalance
LoyaltyPoints
.. rubric:: Ticket and Transit
`edutap.wallet_google.models.tickets_and_transit`
.. currentmodule:: edutap.wallet_google.models.tickets_and_transit
.. autosummary::
:toctree: _autosummary
EventSeat
EventReservationInfo
.. rubric:: Primitives: Enumerations
`edutap.wallet_google.models.primitives.enums`
.. currentmodule:: edutap.wallet_google.models.primitives.enums
.. autosummary::
:toctree: _autosummary
Action
AnimationType
BarcodeRenderEncoding
BarcodeType
ConfirmationCodeLabel
DateFormat
DoorsOpenLabel
GateLabel
GenericType
MessageType
MultipleDevicesAndHoldersAllowedStatus
NfcConstraint
PredefinedItem
RedemptionChannel
ReviewStatus
Role
RowLabel
ScreenshotEligibility
SeatLabel
SectionLabel
SharedDataType
State
RetailState
TotpAlgorithm
TransitOption
ViewUnlockRequirement
.. rubric:: Primitives: Barcode
`edutap.wallet_google.models.primitives.barcode`
.. currentmodule:: edutap.wallet_google.models.primitives.barcode
.. autosummary::
:toctree: _autosummary
Barcode
TotpParameters
TotpDetails
RotatingBarcode
.. rubric:: Primitives: Class Template Info
`edutap.wallet_google.models.primitives.class_template_info`
.. currentmodule:: edutap.wallet_google.models.primitives.class_template_info
.. autosummary::
:toctree: _autosummary
FieldReference
FieldSelector
TemplateItem
BarcodeSectionDetail
CardBarcodeSectionDetails
CardRowOneItem
CardRowTwoItems
CardRowThreeItems
CardRowTemplateInfo
CardTemplateOverride
DetailsItemInfo
DetailsTemplateOverride
FirstRowOption
ListTemplateOverride
ClassTemplateInfo
.. rubric:: Primitives: Data
`edutap.wallet_google.models.primitives.data`
.. currentmodule:: edutap.wallet_google.models.primitives.data
.. autosummary::
:toctree: _autosummary
TextModuleData
LabelValue
LabelValueRow
LinksModuleData
ImageModuleData
InfoModuleData
AppTarget
AppLinkInfo
AppLinkData
.. rubric:: Primitives: Datetime
`edutap.wallet_google.models.primitives.datetime`
.. currentmodule:: edutap.wallet_google.models.primitives.datetime
.. autosummary::
:toctree: _autosummary
DateTime
EventDateTime
TimeInterval
.. rubric:: Primitives: Localized String
`edutap.wallet_google.models.primitives.localized_string`
.. currentmodule:: edutap.wallet_google.models.primitives.localized_string
.. autosummary::
:toctree: _autosummary
TranslatedString
LocalizedString
.. rubric:: Primitives: Location
`edutap.wallet_google.models.primitives.location`
.. currentmodule:: edutap.wallet_google.models.primitives.location
.. autosummary::
:toctree: _autosummary
LatLongPoint
EventVenue
.. rubric:: Primitives: Money
`edutap.wallet_google.models.primitives.money`
.. currentmodule:: edutap.wallet_google.models.primitives.money
.. autosummary::
:toctree: _autosummary
Money
.. rubric:: Primitives: Notification
`edutap.wallet_google.models.primitives.notification`
.. currentmodule:: edutap.wallet_google.models.primitives.notification
.. autosummary::
:toctree: _autosummary
ExpiryNotification
UpcomingNotification
Notifications
Message
AddMessageRequest
.. rubric:: Primitives: Retail
`edutap.wallet_google.models.primitives.retail`
.. currentmodule:: edutap.wallet_google.models.primitives.retail
.. autosummary::
:toctree: _autosummary
DiscoverableProgramMerchantSignupInfo
DiscoverableProgramMerchantSigninInfo
DiscoverableProgram
.. rubric:: Primitives: Reviews
`edutap.wallet_google.models.primitives.review`
.. currentmodule:: edutap.wallet_google.models.primitives.review
.. autosummary::
:toctree: _autosummary
Review
.. rubric:: Primitives: Smarttap
`edutap.wallet_google.models.primitives.smarttap`
### Datatypes and Enums
.. currentmodule:: edutap.wallet_google.models.primitives.smarttap
.. autosummary::
:toctree: _autosummary
Permission
AuthenticationKey
SignUpInfo
IssuerToUserInfo
IssuerContactInfo
SmartTapMerchantData
```

0 comments on commit 27eff6a

Please sign in to comment.