Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create tree-shakeable BaseClient and Rest modules #1374

Closed
owenpearson opened this issue Jul 5, 2023 · 1 comment
Closed

Create tree-shakeable BaseClient and Rest modules #1374

owenpearson opened this issue Jul 5, 2023 · 1 comment
Assignees

Comments

@owenpearson
Copy link
Member

owenpearson commented Jul 5, 2023

  • Create two classes, BaseClient and Rest which are available from a separate import path from the main ably-js module
  • BaseClient optionally takes Rest as a second constructor argument, and if so, allows the REST API to be accessed
  • Should include a typescript interface for the new import path
@sync-by-unito
Copy link

sync-by-unito bot commented Jul 5, 2023

➤ Automation for Jira commented:

The link to the corresponding Jira issue is https://ably.atlassian.net/browse/SDK-3717

lawrence-forooghian added a commit that referenced this issue Aug 2, 2023
TODO what was the approach?

TODO why has this not reduced any size?

TODO does it make sense to have a BaseRest without REST?

Resolves #1374.

Co-authored-by: Owen Pearson <owen.pearson@ably.com>
lawrence-forooghian added a commit that referenced this issue Aug 2, 2023
This moves the following functionality from BaseRest into a new module
named Rest:

- methods that wrap REST endpoints (e.g. `stats`)
- the `request` method
- all functionality accessed via `BaseRest.channels` and `BaseRest.push`

This renders the BaseRest class fairly useless by itself (the above
functionality is pretty much everything it can do) but it allows us to
now construct a BaseRealtime instance that doesn’t have REST
functionality.

Resolves #1374.

Co-authored-by: Owen Pearson <owen.pearson@ably.com>
lawrence-forooghian added a commit that referenced this issue Aug 3, 2023
This moves the following functionality from BaseRest into a new module
named Rest:

- methods that wrap REST endpoints (e.g. `stats`)
- the `request` method
- all functionality accessed via `BaseRest.channels` and `BaseRest.push`

This renders the BaseRest class fairly useless by itself (the above
functionality is pretty much everything it can do) but it allows us to
now construct a BaseRealtime instance that doesn’t have REST
functionality.

Resolves #1374.

Co-authored-by: Owen Pearson <owen.pearson@ably.com>
lawrence-forooghian added a commit that referenced this issue Aug 3, 2023
This moves the following functionality from BaseRest into a new module
named Rest:

- methods that wrap REST endpoints (e.g. `stats`)
- the `request` method
- all functionality accessed via `BaseRest.channels` and `BaseRest.push`

This renders the BaseRest class fairly useless by itself (the above
functionality is pretty much everything it can do) but it allows us to
now construct a BaseRealtime instance that doesn’t have REST
functionality.

Resolves #1374.

Co-authored-by: Owen Pearson <owen.pearson@ably.com>
lawrence-forooghian added a commit that referenced this issue Aug 15, 2023
This moves the following functionality from BaseRest into a new module
named Rest:

- methods that wrap REST endpoints (e.g. `stats`)
- the `request` method
- all functionality accessed via `BaseRest.channels` and `BaseRest.push`

This allows us to now construct a BaseRealtime instance that doesn’t
have REST functionality.

Note that the BaseRest class always includes the Rest module. This comes
after discussions in which we decided that it would be quite useless
without it.

Resolves #1374.

Co-authored-by: Owen Pearson <owen.pearson@ably.com>
lawrence-forooghian added a commit that referenced this issue Aug 15, 2023
This moves the following functionality from BaseRest into a new module
named Rest:

- methods that wrap REST endpoints (e.g. `stats`)
- the `request` method
- all functionality accessed via `BaseRest.channels` and `BaseRest.push`

This allows us to now construct a BaseRealtime instance that doesn’t
have REST functionality.

Note that the BaseRest class always includes the Rest module. This comes
after discussions in which we decided that it would be quite useless
without it.

Resolves #1374.

Co-authored-by: Owen Pearson <owen.pearson@ably.com>
lawrence-forooghian added a commit that referenced this issue Aug 15, 2023
This moves the following functionality from BaseRest into a new module
named Rest:

- methods that wrap REST endpoints (e.g. `stats`)
- the `request` method
- all functionality accessed via `BaseRest.channels` and `BaseRest.push`

This allows us to now construct a BaseRealtime instance that doesn’t
have REST functionality.

Note that the BaseRest class always includes the Rest module. This comes
after discussions in which we decided that it would be quite useless
without it.

Resolves #1374.

Co-authored-by: Owen Pearson <owen.pearson@ably.com>
lawrence-forooghian added a commit that referenced this issue Aug 15, 2023
This moves the following functionality from BaseRest into a new module
named Rest:

- methods that wrap REST endpoints (e.g. `stats`)
- the `request` method
- all functionality accessed via `BaseRest.channels` and `BaseRest.push`

This allows us to now construct a BaseRealtime instance that doesn’t
have REST functionality.

Note that the BaseRest class always includes the Rest module. This comes
after discussions in which we decided that it would be quite useless
without it.

Resolves #1374.

Co-authored-by: Owen Pearson <owen.pearson@ably.com>
lawrence-forooghian added a commit that referenced this issue Aug 16, 2023
This moves the following functionality from BaseRest into a new module
named Rest:

- methods that wrap REST endpoints (e.g. `stats`)
- the `request` method
- all functionality accessed via `BaseRest.channels` and `BaseRest.push`

This allows us to now construct a BaseRealtime instance that doesn’t
have REST functionality.

Note that the BaseRest class always includes the Rest module. This comes
after discussions in which we decided that it would be quite useless
without it.

Resolves #1374.

Co-authored-by: Owen Pearson <owen.pearson@ably.com>
lawrence-forooghian added a commit that referenced this issue Aug 16, 2023
This moves the following functionality from BaseRest into a new module
named Rest:

- methods that wrap REST endpoints (e.g. `stats`)
- the `request` method
- all functionality accessed via `BaseRest.channels` and `BaseRest.push`

This allows us to now construct a BaseRealtime instance that doesn’t
have REST functionality.

Note that the BaseRest class always includes the Rest module. This comes
after discussions in which we decided that it would be quite useless
without it.

Resolves #1374.

Co-authored-by: Owen Pearson <owen.pearson@ably.com>
lawrence-forooghian added a commit that referenced this issue Aug 16, 2023
This moves the following functionality from BaseRest into a new module
named Rest:

- methods that wrap REST endpoints (e.g. `stats`)
- the `request` method
- all functionality accessed via `BaseRest.channels` and `BaseRest.push`

This allows us to now construct a BaseRealtime instance that doesn’t
have REST functionality.

Note that the BaseRest class always includes the Rest module. This comes
after discussions in which we decided that it would be quite useless
without it.

Resolves #1374.

Co-authored-by: Owen Pearson <owen.pearson@ably.com>
lawrence-forooghian added a commit that referenced this issue Aug 17, 2023
This moves the following functionality from BaseRest into a new module
named Rest:

- methods that wrap REST endpoints (e.g. `stats`)
- the `request` method
- all functionality accessed via `BaseRest.channels` and `BaseRest.push`

This allows us to now construct a BaseRealtime instance that doesn’t
have REST functionality.

Note that the BaseRest class always includes the Rest module. This comes
after discussions in which we decided that it would be quite useless
without it.

Resolves #1374.

Co-authored-by: Owen Pearson <owen.pearson@ably.com>
lawrence-forooghian added a commit that referenced this issue Aug 17, 2023
This moves the following functionality from BaseRest into a new module
named Rest:

- methods that wrap REST endpoints (e.g. `stats`)
- the `request` method
- all functionality accessed via `BaseRest.channels` and `BaseRest.push`

This allows us to now construct a BaseRealtime instance that doesn’t
have REST functionality.

Note that the BaseRest class always includes the Rest module. This comes
after discussions in which we decided that it would be quite useless
without it.

Resolves #1374.

Co-authored-by: Owen Pearson <owen.pearson@ably.com>
lawrence-forooghian added a commit that referenced this issue Aug 17, 2023
This moves the following functionality from BaseRest into a new module
named Rest:

- methods that wrap REST endpoints (e.g. `stats`)
- the `request` method
- all functionality accessed via `BaseRest.channels` and `BaseRest.push`

This allows us to now construct a BaseRealtime instance that doesn’t
have REST functionality.

Note that the BaseRest class always includes the Rest module. This comes
after discussions in which we decided that it would be quite useless
without it.

Resolves #1374.

Co-authored-by: Owen Pearson <owen.pearson@ably.com>
lawrence-forooghian added a commit that referenced this issue Aug 17, 2023
This moves the following functionality from BaseRest into a new module
named Rest:

- methods that wrap REST endpoints (e.g. `stats`)
- the `request` method
- all functionality accessed via `BaseRest.channels` and `BaseRest.push`

This allows us to now construct a BaseRealtime instance that doesn’t
have REST functionality.

Note that the BaseRest class always includes the Rest module. This comes
after discussions in which we decided that it would be quite useless
without it.

Resolves #1374.

Co-authored-by: Owen Pearson <owen.pearson@ably.com>
lawrence-forooghian added a commit that referenced this issue Aug 21, 2023
This moves the following functionality from BaseRest into a new module
named Rest:

- methods that wrap REST endpoints (e.g. `stats`)
- the `request` method
- all functionality accessed via `BaseRest.channels` and `BaseRest.push`

This allows us to now construct a BaseRealtime instance that doesn’t
have REST functionality.

Note that the BaseRest class always includes the Rest module. This comes
after discussions in which we decided that it would be quite useless
without it.

Resolves #1374.

Co-authored-by: Owen Pearson <owen.pearson@ably.com>
lawrence-forooghian added a commit that referenced this issue Aug 22, 2023
This moves the following functionality from BaseRest into a new module
named Rest:

- methods that wrap REST endpoints (e.g. `stats`)
- the `request` method
- all functionality accessed via `BaseRest.channels` and `BaseRest.push`

This allows us to now construct a BaseRealtime instance that doesn’t
have REST functionality.

Note that the BaseRest class always includes the Rest module. This comes
after discussions in which we decided that it would be quite useless
without it.

Resolves #1374.

Co-authored-by: Owen Pearson <owen.pearson@ably.com>
lawrence-forooghian added a commit that referenced this issue Sep 5, 2023
This moves the following functionality from BaseRest into a new module
named Rest:

- methods that wrap REST endpoints (e.g. `stats`)
- the `request` method
- all functionality accessed via `BaseRest.channels` and `BaseRest.push`

This allows us to now construct a BaseRealtime instance that doesn’t
have REST functionality.

Note that the BaseRest class always includes the Rest module. This comes
after discussions in which we decided that it would be quite useless
without it.

Resolves #1374.

Co-authored-by: Owen Pearson <owen.pearson@ably.com>
lawrence-forooghian added a commit that referenced this issue Sep 14, 2023
This moves the following functionality from BaseClient into a new module
named Rest:

- methods that wrap REST endpoints (e.g. `stats`)
- the `request` method
- all functionality accessed via `BaseRest.channels` and `BaseRest.push`

This allows us to now construct a BaseRealtime instance that doesn’t
have REST functionality.

Note that the BaseRest class always includes the Rest module. This comes
after discussions in which we decided that it would be quite useless
without it.

Resolves #1374.

Co-authored-by: Owen Pearson <owen.pearson@ably.com>
lawrence-forooghian added a commit that referenced this issue Oct 26, 2023
This moves the following functionality from BaseClient into a new module
named Rest:

- methods that wrap REST endpoints (e.g. `stats`)
- the `request` method
- all functionality accessed via `BaseRest.channels` and `BaseRest.push`

This allows us to now construct a BaseRealtime instance that doesn’t
have REST functionality.

Note that the BaseRest class always includes the Rest module. This comes
after discussions in which we decided that it would be quite useless
without it.

Resolves #1374.

Co-authored-by: Owen Pearson <owen.pearson@ably.com>
lawrence-forooghian added a commit that referenced this issue Oct 26, 2023
This moves the following functionality from BaseClient into a new module
named Rest:

- methods that wrap REST endpoints (e.g. `stats`)
- the `request` method
- all functionality accessed via `BaseRest.channels` and `BaseRest.push`

This allows us to now construct a BaseRealtime instance that doesn’t
have REST functionality.

Note that the BaseRest class always includes the Rest module. This comes
after discussions in which we decided that it would be quite useless
without it.

Resolves #1374.

Co-authored-by: Owen Pearson <owen.pearson@ably.com>
lawrence-forooghian added a commit that referenced this issue Nov 1, 2023
This moves the following functionality from BaseClient into a new module
named Rest:

- methods that wrap REST endpoints (e.g. `stats`)
- the `request` method
- all functionality accessed via `BaseRest.channels` and `BaseRest.push`

This allows us to now construct a BaseRealtime instance that doesn’t
have REST functionality.

Note that the BaseRest class always includes the Rest module. This comes
after discussions in which we decided that it would be quite useless
without it.

Resolves #1374.

Co-authored-by: Owen Pearson <owen.pearson@ably.com>
lawrence-forooghian added a commit that referenced this issue Nov 6, 2023
This moves the following functionality from BaseClient into a new module
named Rest:

- methods that wrap REST endpoints (e.g. `stats`)
- the `request` method
- all functionality accessed via `BaseRest.channels` and `BaseRest.push`

This allows us to now construct a BaseRealtime instance that doesn’t
have REST functionality.

Note that the BaseRest class always includes the Rest module. This comes
after discussions in which we decided that it would be quite useless
without it.

Resolves #1374.

Co-authored-by: Owen Pearson <owen.pearson@ably.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant