@memori.ai/memori-api-client
Version:
React library to integrate a Memori in your app or website
21 lines • 856 B
JavaScript
import { apiFetcher } from '../apiFetcher';
export default (apiUrl) => ({
getUnansweredQuestions: async (sessionId) => apiFetcher(`/UnansweredQuestions/${sessionId}`, {
method: 'GET',
apiUrl,
}),
getUnansweredQuestionsPaginated: async (sessionId, from, howMany) => apiFetcher(`/UnansweredQuestions/${sessionId}/${from}/${howMany}`, {
method: 'GET',
apiUrl,
}),
postUnansweredQuestion: async (sessionId, unansweredQuestion) => apiFetcher(`/UnansweredQuestion/${sessionId}`, {
method: 'POST',
apiUrl,
body: unansweredQuestion,
}),
deleteUnansweredQuestion: async (sessionId, unansweredQuestionId) => apiFetcher(`/UnansweredQuestion/${sessionId}/${unansweredQuestionId}`, {
method: 'DELETE',
apiUrl,
}),
});
//# sourceMappingURL=unansweredQuestions.js.map