Beispiel #1
0
import { createAction } from 'tahoe';
import { Schema, valuesOf } from 'normalizr';

const response = new Schema('response');
const joke = new Schema('jokes');

response.define({
  value: joke
});

export const getRandomFact = createAction({
  endpoint: () => `http://api.icndb.com/jokes/random?exclude=[explicit]`,
  method: 'GET',
  model: response
});
Beispiel #2
0
import { createAction } from 'tahoe'

export default createAction({
  endpoint: '/auth/local/start',
  method: 'POST'
})