File tree Expand file tree Collapse file tree 4 files changed +38
-1
lines changed
Expand file tree Collapse file tree 4 files changed +38
-1
lines changed Original file line number Diff line number Diff line change @@ -367,6 +367,25 @@ GNSS.get()
367367});
368368```
369369
370+ ### Hoppie
371+
372+ #### Send the request
373+ ``` ts
374+ import { Hoppie } from ' @flybywiresim/api-client' ;
375+
376+ const body {
377+ logon : ' XXXXXXXXX' ,
378+ from : ' TEST0' ,
379+ to : ' TEST0' ,
380+ type : ' poll'
381+ }
382+ Hoppie .post (body )
383+ .then (data => {
384+ console .log (data );
385+ }).catch (err => {
386+ console .error (err );
387+ });
388+ ```
370389
371390
372391## License
Original file line number Diff line number Diff line change 11{
22 "name" : " @flybywiresim/api-client" ,
3- "version" : " 0.15 .0" ,
3+ "version" : " 0.16 .0" ,
44 "description" : " Client library for the FlyByWire Simulations API" ,
55 "main" : " dist/index.js" ,
66 "module" : " dist/index.esm.js" ,
Original file line number Diff line number Diff line change 1+ describe ( 'Hoppie' , ( ) => {
2+ // API currently out of order
3+ test ( 'API' , ( ) => {
4+
5+ } ) ;
6+ } ) ;
Original file line number Diff line number Diff line change 1+ import { NXApi } from '../index' ;
2+ import { post } from '../utils' ;
3+
4+ export declare class HoppieResponse {
5+ response : string ;
6+ }
7+
8+ export class Hoppie {
9+ public static sendRequest ( body : any ) : Promise < HoppieResponse > {
10+ return post < HoppieResponse > ( new URL ( '/api/v1/hoppie' , NXApi . url ) , body ) ;
11+ }
12+ }
You can’t perform that action at this time.
0 commit comments