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

Using api-client for real client application #193

Closed
heroin-moose opened this issue Feb 4, 2018 · 6 comments
Closed

Using api-client for real client application #193

heroin-moose opened this issue Feb 4, 2018 · 6 comments

Comments

@heroin-moose
Copy link

Hi,

Is it a good idea to use api-client library for building a real Wire client? AFAICS it is a more or less complete HTTP API so it would save me some typing if I use wire-server as a git submodule. However, it's obviously an internal part of the project so it can be rewritten/eliminated/etc.

@jschaul
Copy link
Member

jschaul commented Feb 6, 2018

Hi @heroin-moose

We currently use the api-client (through the higher-level api-bot library) as part of our smoke tests. As such, it is unlikely to be removed in the future. Please note that it is not entirely complete and not our priority to keep up-to-date (Pull requests are always welcome if you find an API call which isn't implemented). Instead of using a git submodule, you could also refer to wire-server through your stack.yaml, e.g.

packages:
- '.'
- location:
    git: https://github.com/wireapp/wire-server.git
    commit: daa88e58e19f933143eeef386baa6e2bb8dadd7a
  subdirs:
  - libs/api-client
  - libs/api-bot
  extra-dep: true

Finally, for building a native Wire client, you may, in case you prefer another implementation language to Haskell, potentially also want to look at https://github.com/wireapp/coax (an incomplete Rust implementation - please note the warnings in the README)

@heroin-moose
Copy link
Author

heroin-moose commented Feb 6, 2018

Instead of using a git submodule, you could also refer to wire-server through your stack.yaml

Yeah, already did it. Hail to the stack.

Finally, for building a native Wire client, you may, in case you prefer another implementation language to Haskell, potentially also want to look at https://github.com/wireapp/coax (an incomplete Rust implementation - please note the warnings in the README).

I'm not a big fan of Rust or GTK so my language of choice (for now) is Haskell. I'm trying to make my app more or less toolkit agnostic. Currently I read wire-server and coax in order to understand the protocol (both JSON and Protobuf), but a guide written by developers would be awesome (should we expect one?). I found Swagger.hs files that define some API endpoints, but I guess there's more to it. Also, there is no description (or I failed to find one) for the call sequences (things like "POST /login" -> "POST /access every 15 minutes" are pretty obvious, but other things may be not).

@jschaul
Copy link
Member

jschaul commented Feb 12, 2018

but a guide written by developers would be awesome (should we expect one?). I found Swagger.hs files that define some API endpoints, but I guess there's more to it. Also, there is no description (or I failed to find one) for the call sequences (things like "POST /login" -> "POST /access every 15 minutes" are pretty obvious, but other things may be not).

We have some documentation for client developers regarding call sequences and semantics, which is currently not open-sourced. We plan to release some of that eventually. This issue would then be updated if/when that happens.

@heroin-moose
Copy link
Author

It's nice to hear that, thanks.

@tiago-loureiro
Copy link
Contributor

@heroin-moose Could you please close down this issue if you have no further questions on this topic?

@heroin-moose
Copy link
Author

Sure thing.

smatting pushed a commit that referenced this issue Apr 20, 2022
* Remove misleading and confusing afterthough.

* Clarify.

Co-authored-by: Arthur Wolf <wolf.arthur@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants