Skip to content

Commit

Permalink
docs: polish it
Browse files Browse the repository at this point in the history
  • Loading branch information
c4710n committed Oct 13, 2024
1 parent 3ac7c8b commit 8f04013
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 20 deletions.
6 changes: 3 additions & 3 deletions lib/apple/app_store_server_api.ex
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,17 @@ defmodule Apple.AppStoreServerAPI do
> #### Note {: .info}
> Using a private key of the "In-App Purchase" type is sufficient.
After building it, use it in the `Authorization` header like this:
```text
Authorization: Bearer <JWT>
```
## More
## More resources
* [Generating JSON Web Tokens for API requests](https://developer.apple.com/documentation/appstoreserverapi/generating_json_web_tokens_for_api_requests)
"""
@spec build_auth_token!(
AppStoreConnect.issuer_id(),
Expand Down
3 changes: 3 additions & 0 deletions lib/apple/maps_server_api.ex
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ defmodule Apple.MapsServerAPI do
"""
@type origin :: String.t()

@doc """
Builds a token to authorize HTTP requests.
"""
@spec build_auth_token!(
Developer.team_id(),
Developer.key_id(),
Expand Down
28 changes: 14 additions & 14 deletions lib/apple/types/developer.ex
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,23 @@ defmodule Apple.Types.Developer do
@typedoc """
The team ID, which is a 10-character string, like `"6MPDV0UYYX"`
It can be obtained from your Apple Developer account by following this path:
To obtain the team ID, sign into Apple Developer and complete the following
steps:
1. Sign into your Apple Developer account.
2. Navigate to "Membership details".
1. Navigate to "Membership details".
"""
@type team_id :: String.t()

@typedoc """
The private key ID, like `"2Y9R5HMY68"`.
It can be obtained from your Apple Developer account by following this path:
To obtain the private key ID, sign into Apple Developer and complete the
following steps:
1. Sign into your Apple Developer account.
2. Navigate to "Certificates, IDs & Profiles".
3. Navigate to "Keys".
4. Click the plus button to add a new key.
1. Navigate to "Certificates, IDs & Profiles".
2. Navigate to "Keys".
3. Click the plus button to generate a new private key.
"""
@type key_id :: String.t()
Expand All @@ -44,13 +44,13 @@ defmodule Apple.Types.Developer do
@typedoc """
The registered service ID, like `"com.example.weatherkit"`.
It can be obtained from your Apple Developer account by following this path:
To obtain the registered service ID, sign into Apple Developer and complete
the following steps:
1. Sign into your Apple Developer account.
2. Navigate to "Certificates, IDs & Profiles".
3. Navigate to "Identifiers".
4. Click the plus button to add a new identifier.
5. Select "Service IDs", and register a service ID.
1. Navigate to "Certificates, IDs & Profiles".
2. Navigate to "Identifiers".
3. Click the plus button to add a new identifier.
4. Select "Service IDs", and register a service ID.
"""
@type service_id :: String.t()
Expand Down
8 changes: 5 additions & 3 deletions lib/apple/weather_kit_rest_api.ex
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,16 @@ defmodule Apple.WeatherKitRestAPI do
@doc """
Builds a token to authorize HTTP requests.
To get the value of arguments, such as `team_id`, `key_id` and so on,
please read [Request authentication for WeatherKit REST API](https://developer.apple.com/documentation/weatherkitrestapi/request_authentication_for_weatherkit_rest_api).
After building it, use it in the `Authorization` header like this:
```text
Authorization: Bearer <JWT>
```
## More resources
* [Request authentication for WeatherKit REST API](https://developer.apple.com/documentation/weatherkitrestapi/request_authentication_for_weatherkit_rest_api)
"""
@spec build_auth_token!(
Developer.team_id(),
Expand Down

0 comments on commit 8f04013

Please sign in to comment.