Skip to content

Commit

Permalink
some updates for 2.0 and a todo
Browse files Browse the repository at this point in the history
  • Loading branch information
jensens committed Dec 16, 2024
1 parent 14a7a6c commit 1b914d3
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 12 deletions.
12 changes: 6 additions & 6 deletions source/packages/edutap_wallet_google/explanation.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,19 @@ In this client package all data-structure defined by Google are represented by P
The models are defined in the `edutap.wallet_google.models` module and are documented in the [Reference](reference.md).

All top-level models are registered in the `edutap.wallet_google.registry` module.
In further code, the models are referenced by their registered name, which is the name of the class (in CamelCase).
In further code, the models are referenced by their registered name, which is the name of the class (in CamelCase, as Google names them).

The API functions are defined in the `edutap.wallet_google.api` module.
They follow a CRUD API, while there is no delete at Google Wallet, but a disable.
They follow a CRUD API approach, while there is no delete at Google Wallet (this needs to be done as an update with expiration date in past).
Additional a message can be sent to a Wallet Class or Wallet Object.
Also, a download link can be created.
Also, a download link aka "Add To Wallet" link can be created.
All are documented in the [Reference](reference.md) section.

Most API function do take a name of a model as first parameter.
Some API functions do take a name of a model as first parameter.
The name is the registered name.
Depending on the registered name used, a function might not be able to execute.
This is checked by the API function based on the registry record of the model, where the capabilities are stored.
The constraints are coming from the Google API and are mirrored here.
This is checked by the API function at runtime based on the registry record of the model, where the capabilities are stored.
Each constraint origins in the Google API and is mirrored here.


## Contributing
Expand Down
5 changes: 5 additions & 0 deletions source/packages/edutap_wallet_google/tutorials.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
# Tutorials

```{todo}
Update for 2.0
```

We prepared four tutorials to get you started with the Google Wallet API.

Before starting, follow the [installation and configuration instructions](installation.md).

## Create a pass and load it into the Google Wallet


In this tutorial you will
- create a Wallet Class (a template),
- a Wallet Object (the pass) based on the Wallet Class and
Expand Down
11 changes: 5 additions & 6 deletions source/packages/getting_started.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,13 @@ wallet_object_with_class_reference = api.new(
)
```

Create URL for adding the pass to a wallet. This link needs to get delivered to the tapper.
Create URL for adding the pass to a wallet. This link needs to get delivered to the {term}`tapper`.

```python
add_to_wallet_url = api.save_link({
"genericObjects": [
wallet_object_with_class_reference
]
})
add_to_wallet_url = api.save_link(
wallet_object_model,
wallet_object_with_class_reference,
)
```

#### Case 2
Expand Down

0 comments on commit 1b914d3

Please sign in to comment.