yapi_api 1.0.0 copy "yapi_api: ^1.0.0" to clipboard
yapi_api: ^1.0.0 copied to clipboard

A Dart package for interacting with YApi server APIs. Provides easy-to-use methods to fetch interface and project data from YApi with proper authentication and error handling.

example/yapi_api_example.dart

import 'package:yapi_api/yapi_api.dart';

void main() {
  final YapiApiHelper apiHelper = YapiApiHelper();
  apiHelper.baseUrl = 'http://yapi.example.com';
  apiHelper.cookie = 'your_cookie_here';

  apiHelper.getInterface(1).then((YapiInterfaceResponse? response) {
    if (response != null) {
      print('interface: ${response.data?.title}');
    } else {
      print('get interface failed ');
    }
  });

  apiHelper.getProject(1).then((YapiProjectResponse? response) {
    if (response != null) {
      print('project : ${response.data?.name}');
    } else {
      print('get project failed ');
    }
  });
}
0
likes
160
points
6
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

A Dart package for interacting with YApi server APIs. Provides easy-to-use methods to fetch interface and project data from YApi with proper authentication and error handling.

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

http

More

Packages that depend on yapi_api