Skip to content

Commit

Permalink
Remove Transition Checker email subscription endpoints
Browse files Browse the repository at this point in the history
These are no longer used.

See also alphagov/gds-api-adapters#1093
  • Loading branch information
barrucadu committed Jul 7, 2021
1 parent adfbdc9 commit 51e96b9
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 253 deletions.

This file was deleted.

4 changes: 0 additions & 4 deletions config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,5 @@
get "/saved_pages/:page_path", to: "saved_pages#show"
put "/saved_pages/:page_path", to: "saved_pages#update"
delete "/saved_pages/:page_path", to: "saved_pages#destroy"

# delete (+ controller) when gds-api-adapters has been updated
get "/transition-checker-email-subscription", to: "transition_checker_email_subscription#show"
post "/transition-checker-email-subscription", to: "transition_checker_email_subscription#update"
end
end
88 changes: 0 additions & 88 deletions docs/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ management. This API is not for other government services.
- [`GET /api/attributes`](#get-apiattributes)
- [`PATCH /api/attributes`](#patch-apiattributes)
- [`GET /api/attributes/names`](#get-apiattributesnames)
- [`GET /api/transition-checker-email-subscription`](#get-apitransition-checker-email-subscription)
- [`POST /api/transition-checker-email-subscription`](#post-apitransition-checker-email-subscription)
- [`GET /api/email-subscriptions/:subscription_name`](#get-apiemail-subscriptionssubscription_name)
- [`PUT /api/email-subscriptions/:subscription_name`](#put-apiemail-subscriptionssubscription_name)
- [`DELETE /api/email-subscriptions/:subscription_name`](#delete-apiemail-subscriptionssubscription_name)
Expand Down Expand Up @@ -412,92 +410,6 @@ Response:
}
```

### `GET /api/transition-checker-email-subscription`

Checks if the user has an active Transition Checker email subscription.

#### Request headers

- `GOVUK-Account-Session`
- the user's session identifier

#### JSON response fields

- `govuk_account_session` *(optional)*
- a new session identifier
- `has_subscription`
- a boolean

#### Response codes

- 403 if the session's level of authentication is too low (see [error: level of authentication too low](#level-of-authentication-too-low))
- 401 if the session identifier is invalid
- 200 otherwise

#### Example request / response

Request (with gds-api-adapters):

```ruby
GdsApi.account_api.check_for_email_subscription(
govuk_account_session: "session-identifier",
)
```

Response:

```json
{
"govuk_account_session": "YWNjZXNzLXRva2Vu.cmVmcmVzaC10b2tlbg==",
"has_subscription": false
}
```

### `POST /api/transition-checker-email-subscription`

Updates the user's Transition Checker email subscription, cancelling any previous subscription they had.

#### Request headers

- `GOVUK-Account-Session`
- the user's session identifier

#### Request parameters

- `slug`
- the email topic slug to subscribe to

#### JSON response fields

- `govuk_account_session` *(optional)*
- a new session identifier


#### Response codes

- 403 if the session's level of authentication is too low (see [error: level of authentication too low](#level-of-authentication-too-low))
- 401 if the session identifier is invalid
- 200 otherwise

#### Example request / response

Request (with gds-api-adapters):

```ruby
GdsApi.account_api.set_email_subscription(
govuk_account_session: "session-identifier",
slug: "slug-name",
)
```

Response:

```json
{
"govuk_account_session": "YWNjZXNzLXRva2Vu.cmVmcmVzaC10b2tlbg=="
}
```

### `GET /api/email-subscriptions/:subscription_name`

Get the details of a named email subscription
Expand Down
130 changes: 0 additions & 130 deletions spec/requests/transition_checker_email_subscription_spec.rb

This file was deleted.

0 comments on commit 51e96b9

Please sign in to comment.