Browse Source

Add progress method to seeker API

dev
David Ludwig 4 years ago
parent
commit
0a561b8b91
3 changed files with 15 additions and 0 deletions
  1. +11
    -0
      api/seeker/src/IpcClient.ts
  2. +1
    -0
      api/seeker/src/index.ts
  3. +3
    -0
      api/seeker/src/schema.ts

+ 11
- 0
api/seeker/src/IpcClient.ts View File

@ -24,4 +24,15 @@ export class IpcClient<M extends Microservice = Microservice> extends IpcClientS
this.log("No response from seeker notifying added movie", e);
});
}
/**
* Get the states of the provided ticket IDs
*/
public async getMovieTicketStates(ticketIds: number[]) {
let response = await this.request("movie_ticket_states",ticketIds);
if (response.error) {
throw new Error("Failed to get movie ticket progress");
}
return response.data;
}
}

+ 1
- 0
api/seeker/src/index.ts View File

@ -1,2 +1,3 @@
export * from "./constants";
export * from "./IpcClient";
export * from "./schema";

+ 3
- 0
api/seeker/src/schema.ts View File

@ -0,0 +1,3 @@
export interface ITicketState {
progress: number|null
}

Loading…
Cancel
Save