- Dart 99.8%
- Shell 0.2%
| doc | ||
| lib | ||
| media | ||
| .gitignore | ||
| .openapi-generator-ignore | ||
| analysis_options.yaml | ||
| CHANGELOG.md | ||
| generate.sh | ||
| LICENSE | ||
| pubspec.yaml | ||
| README.md | ||
Fluxer Dart SDK
Fluxer is a free and open source instant messaging and VoIP platform for friends, groups, and communities. Self-host it and every feature is unlocked.
This is a package for Dart / Flutter that allows you access to the Fluxer API, and it's also used in the offical Fluxer app!
Requirements
- Dart 2.15.0+ or Flutter 2.8.0+
- Dio 5.0.0+ (https://pub.dev/packages/dio)
Installation & Usage
pub.dev
To use the package from pub.dev, please include the following in pubspec.yaml
dependencies:
fluxer_dart: 1.2.1
Github
If this Dart package is published to Github, please include the following in pubspec.yaml
dependencies:
fluxer_dart:
git:
url: https://github.com/fluxerapp/dart_sdk.git
#ref: main
Local development
To use the package from your local drive, please include the following in pubspec.yaml
dependencies:
fluxer_dart:
path: /path/to/fluxer_dart
Getting Started
Basic Usage
import 'package:fluxer_dart/fluxer_dart.dart';
final fluxer = FluxerDart();
fluxer.setBearerAuth('bearerToken', 'your_token_here');
final usersApi = fluxer.getUsersApi();
Bot Token Authentication
For bot users, use setApiKey with the botToken auth name:
import 'package:fluxer_dart/fluxer_dart.dart';
final fluxer = FluxerDart();
fluxer.setApiKey('botToken', 'Bot your_bot_token_here');
final channelsApi = fluxer.getChannelsApi();
Admin API Key Authentication
For admin endpoints, use setApiKey with the adminApiKey auth name:
import 'package:fluxer_dart/fluxer_dart.dart';
final fluxer = FluxerDart();
fluxer.setApiKey('adminApiKey', 'your_admin_key_here');
final adminApi = fluxer.getAdminApi();
Self-Hosted Instance
If you are running a self-hosted Fluxer instance, pass basePathOverride to point the SDK at your own API endpoint:
import 'package:fluxer_dart/fluxer_dart.dart';
final fluxer = FluxerDart(
basePathOverride: 'https://api.your-domain.com/v1',
);
fluxer.setBearerAuth('bearerToken', 'your_token_here');
final usersApi = fluxer.getUsersApi();
Note
The default base path is
https://api.fluxer.app/v1. When providingbasePathOverride, include the full path with the version prefix (e.g./v1).
Issues & Bug Reports
Found a bug? Please file an issue on the main Fluxer repository:
When reporting issues related to this Dart SDK, please:
- Add
[dart_sdk]tag at the start of the title - Include your Dart/Flutter version
- Provide a minimal code example that reproduces the issue (if possible)
- Include the SDK version you're using
Documentation For Authorization
Authentication schemes defined for the API:
botToken
- Type: API key
- API key parameter name: Authorization
- Location: HTTP header
oauth2Token
- Type: OAuth
- Flow: accessCode
- Authorization URL: /oauth2/authorize
- Scopes:
- identify: Read basic user identity information.
- email: Read the user email address.
- guilds: Read guild membership information for the current user.
- connections: Read linked third-party account connections for the current user.
- bot: Add a bot user to a guild.
- admin: Access admin endpoints when the user has admin ACLs.
bearerToken
- Type: HTTP Bearer Token authentication
sessionToken
- Type: API key
- API key parameter name: Authorization
- Location: HTTP header
adminApiKey
- Type: API key
- API key parameter name: Authorization
- Location: HTTP header
Package Gen
This Dart package is automatically generated by the OpenAPI Generator project:
- API version: 1.0.0
- Generator version: 7.17.0
- Build package: org.openapitools.codegen.languages.DartDioClientCodegen