-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: updated queue implementation (#7)
* feat: updated queue implementation this brings the dart/flutter client to parity with the other clients for queue-based apis * chore: update pucspec
- Loading branch information
Showing
12 changed files
with
276 additions
and
151 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import './config.dart'; | ||
import './http.dart'; | ||
|
||
const _defaultTokenExpiration = 180; | ||
|
||
Future<String> createJwtToken( | ||
{required List<String> apps, | ||
required Config config, | ||
int expiration = _defaultTokenExpiration}) async { | ||
final response = await sendRequest("https://rest.alpha.fal.ai/tokens/", | ||
config: config, | ||
method: "POST", | ||
input: {"allowed_apps": apps, "token_expiration": expiration}); | ||
return response as String; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.