Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/chwarr/gio-api-example
Example showing how to call Groups.io APIs from C#
https://github.com/chwarr/gio-api-example
Last synced: 12 days ago
JSON representation
Example showing how to call Groups.io APIs from C#
- Host: GitHub
- URL: https://github.com/chwarr/gio-api-example
- Owner: chwarr
- License: agpl-3.0
- Created: 2020-04-18T10:26:51.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-04-18T10:37:21.000Z (over 4 years ago)
- Last Synced: 2024-11-05T11:16:49.357Z (about 2 months ago)
- Language: C#
- Size: 16.6 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Groups.io API example in C\#
This example shows how to call two [Groups.io][gio] [APIs][api] from a C#
app:* [`login`][login]
* [`updateprofile`][updateprofile]I've chosen to use a .NET Core 3.1 app.
## Running
Ensure you have a copy of [.NET Core SDK 3.1][dotnet] or later installed.
(.NET 5 or later will work too.)Clone this repository:
```cmd
git clone https://github.com/chwarr/gio-api-example.git
```Run the example by giving it the email to login as and a new location for
that user's profile:```cmd
dotnet run [email protected] "Somewhere on the Internet"
```You will be prompted for the password and a 2FA code.
## Credentials
The Groups.io API has two ways of performing authentication: you can either
use a login token from the login response or use cookies. This example uses
cookies as it is easier to program against, as `HttpClient` silently handles
parsing them from responses and adding them to requests, and it enables
access to more Groups.io features.## License
Copyright 2020, G. Christopher Warrington
This software is released under the GNU AFFERO GENERAL PUBLIC LICENSE
Version 3. A copy of this license is included in the file LICENSE.[api]: https://groups.io/api
[dotnet]: https://dotnet.microsoft.com/download
[gio]: https://groups.io
[login]: https://groups.io/api#login
[updateprofile]: https://groups.io/api#update_profile