import 'package:pieces_os_client/api.dart';
All URIs are relative to http://localhost:3000
Method | HTTP request | Description |
---|---|---|
sharesCreateNewShare | POST /shares/create | /shares/create [POST] |
sharesDeleteShare | POST /shares/{share}/delete | /shares/{share}/delete [POST] |
sharesSnapshot | GET /shares | /shares [GET] |
sharesSpecificShareSnapshot | GET /shares/{share} | /shares/{share} [GET] |
Shares sharesCreateNewShare(transferables, seededShare)
/shares/create [POST]
This endpoint will accept an asset. Response here will be a Share that was created.
import 'package:pieces_os_client/api.dart';
final api_instance = SharesApi();
final transferables = true; // bool | This is a boolean that will decided if we are want to return the transferable data (default) or not(performance enhancement)
final seededShare = SeededShare(); // SeededShare |
try {
final result = api_instance.sharesCreateNewShare(transferables, seededShare);
print(result);
} catch (e) {
print('Exception when calling SharesApi->sharesCreateNewShare: $e\n');
}
Name | Type | Description | Notes |
---|---|---|---|
transferables | bool | This is a boolean that will decided if we are want to return the transferable data (default) or not(performance enhancement) | [optional] |
seededShare | SeededShare | [optional] |
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
String sharesDeleteShare(share)
/shares/{share}/delete [POST]
This endpoint will just take a share id(as a url param) to delete out of the shares table, will return the share id that was deleted.
import 'package:pieces_os_client/api.dart';
final api_instance = SharesApi();
final share = share_example; // String | Share id
try {
final result = api_instance.sharesDeleteShare(share);
print(result);
} catch (e) {
print('Exception when calling SharesApi->sharesDeleteShare: $e\n');
}
Name | Type | Description | Notes |
---|---|---|---|
share | String | Share id |
String
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Shares sharesSnapshot(transferables)
/shares [GET]
This will return all of your shares. A Share is an asset that you as a user decided to share with another user via link.
import 'package:pieces_os_client/api.dart';
final api_instance = SharesApi();
final transferables = true; // bool | This is a boolean that will decided if we are want to return the transferable data (default) or not(performance enhancement)
try {
final result = api_instance.sharesSnapshot(transferables);
print(result);
} catch (e) {
print('Exception when calling SharesApi->sharesSnapshot: $e\n');
}
Name | Type | Description | Notes |
---|---|---|---|
transferables | bool | This is a boolean that will decided if we are want to return the transferable data (default) or not(performance enhancement) | [optional] |
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Share sharesSpecificShareSnapshot(share, transferables)
/shares/{share} [GET]
This is an endpoint to enable a client to access a specific share through a provided share id.
import 'package:pieces_os_client/api.dart';
final api_instance = SharesApi();
final share = share_example; // String | Share id
final transferables = true; // bool | This is a boolean that will decided if we are want to return the transferable data (default) or not(performance enhancement)
try {
final result = api_instance.sharesSpecificShareSnapshot(share, transferables);
print(result);
} catch (e) {
print('Exception when calling SharesApi->sharesSpecificShareSnapshot: $e\n');
}
Name | Type | Description | Notes |
---|---|---|---|
share | String | Share id | |
transferables | bool | This is a boolean that will decided if we are want to return the transferable data (default) or not(performance enhancement) | [optional] |
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]