A library which provides simple access to Stud.IP's RestAPI services using OAuth 2 authentication for Dart.
Add to pubspec.yaml
:
dependencies:
studip: ^3.0.0-alpha.0
A simple usage example:
import 'package:studip/studip.dart' as studip;
void main() {
const studIpProviderUrl = 'http://studip.uni-passau.de/studip/';
const apiBaseUrl = '${studIpProviderUrl}jsonapi.php/v1/';
// Initialize client and log in
final client = studip.StudIPClient(
oAuthBaseUrl: studIpProviderUrl,
redirectUri: 'example://oauth_callback',
customUriScheme: 'example',
clientId: 'CLIENT_ID',
//clientSecret: 'CLIENT_SECRET_IF_NEEDED',
apiBaseUrl: apiBaseUrl,
);
client.apiGetJson('users/me').then((dynamic decoded) {
// Example parsing of response
print('${decoded['data']['attributes']['formatted-name']}');
});
}
Please file feature requests and bugs at the issue tracker.