rickmortyapi
Advanced tools
Comparing version 2.0.1 to 2.1.1
@@ -0,1 +1,6 @@ | ||
## 2.1.1 | ||
### Bug Fixes | ||
- episode type [67085dc](https://github.com/afuh/rick-and-morty-api-node/commit/67085dc17943b7bd1bd59209d30ddc67c5c9df47) | ||
## 2.0.1 | ||
@@ -2,0 +7,0 @@ |
@@ -1,2 +0,2 @@ | ||
"use strict";var i=Object.defineProperty;var A=Object.getOwnPropertyDescriptor;var E=Object.getOwnPropertyNames;var I=Object.prototype.hasOwnProperty;var L=(e,t)=>{for(var o in t)i(e,o,{get:t[o],enumerable:!0})},C=(e,t,o,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of E(t))!I.call(e,s)&&s!==o&&i(e,s,{get:()=>t[s],enumerable:!(n=A(t,s))||n.enumerable});return e};var F=e=>C(i({},"__esModule",{value:!0}),e);var $={};L($,{getCharacter:()=>d,getCharacters:()=>u,getEndpoints:()=>h,getEpisode:()=>b,getEpisodes:()=>R,getLocation:()=>l,getLocations:()=>f});module.exports=F($);var T={required:"You are using an invalid argument. As an argument use an integer (Id) or an array of integers (Ids).",optional:"You are using an invalid argument. As an argument use a filter object or leave it blank."},a=e=>typeof e=="number"&&Number.isInteger(e),y=e=>Array.isArray(e)&&e.every(t=>a(t)),P=(e,t)=>{if(t&&a(e))return`/${e}`;if(t&&y(e)){let o=e;return`/${o.length?o:"[-1]"}`}if(!t&&typeof e=="object"&&!Array.isArray(e))return`/?${new URLSearchParams(e).toString()}`;throw new Error(T[t?"required":"optional"])},p=P;var w=async e=>{let t=await fetch(`https://rickandmortyapi.com/api/${e}`);return t.ok?{data:await t.json(),status:t.status,statusMessage:t.statusText}:{data:{},status:t.status,statusMessage:t.statusText}},c=w;var k=async({endpoint:e,options:t,isIdRequired:o=!1})=>{let n=p(t,o);return c(`${e}/${n}`)},r=k;var m="character",u=e=>r({endpoint:m,options:e??{}}),d=e=>r({endpoint:m,options:e,isIdRequired:!0});var g="location",f=e=>r({endpoint:g,options:e??{}}),l=e=>r({endpoint:g,options:e,isIdRequired:!0});var x="episode",R=e=>r({endpoint:x,options:e??{}}),b=e=>r({endpoint:x,options:e,isIdRequired:!0});var h=()=>r({endpoint:"",options:{}});0&&(module.exports={getCharacter,getCharacters,getEndpoints,getEpisode,getEpisodes,getLocation,getLocations}); | ||
"use strict";var i=Object.defineProperty;var A=Object.getOwnPropertyDescriptor;var E=Object.getOwnPropertyNames;var I=Object.prototype.hasOwnProperty;var L=(e,t)=>{for(var o in t)i(e,o,{get:t[o],enumerable:!0})},C=(e,t,o,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of E(t))!I.call(e,s)&&s!==o&&i(e,s,{get:()=>t[s],enumerable:!(n=A(t,s))||n.enumerable});return e};var F=e=>C(i({},"__esModule",{value:!0}),e);var $={};L($,{getCharacter:()=>d,getCharacters:()=>u,getEndpoints:()=>h,getEpisode:()=>b,getEpisodes:()=>R,getLocation:()=>l,getLocations:()=>f});module.exports=F($);var T={required:"You are using an invalid argument. As an argument use an integer (Id) or an array of integers (Ids).",optional:"You are using an invalid argument. As an argument use a filter object or leave it blank."},a=e=>typeof e=="number"&&Number.isInteger(e),y=e=>Array.isArray(e)&&e.every(a),P=(e,t)=>{if(t&&a(e))return`/${e}`;if(t&&y(e)){let o=e;return`/${o.length?o:"[0]"}`}if(!t&&typeof e=="object"&&!Array.isArray(e))return`/?${new URLSearchParams(e).toString()}`;throw new Error(T[t?"required":"optional"])},p=P;var w=async e=>{let t=await fetch(`https://rickandmortyapi.com/api/${e}`);return t.ok?{data:await t.json(),status:t.status,statusMessage:t.statusText}:{data:{},status:t.status,statusMessage:t.statusText}},c=w;var k=async({endpoint:e,options:t,isIdRequired:o=!1})=>{let n=p(t,o);return c(`${e}/${n}`)},r=k;var m="character",u=e=>r({endpoint:m,options:e??{}}),d=e=>r({endpoint:m,options:e,isIdRequired:!0});var g="location",f=e=>r({endpoint:g,options:e??{}}),l=e=>r({endpoint:g,options:e,isIdRequired:!0});var x="episode",R=e=>r({endpoint:x,options:e??{}}),b=e=>r({endpoint:x,options:e,isIdRequired:!0});var h=()=>r({endpoint:"",options:{}});0&&(module.exports={getCharacter,getCharacters,getEndpoints,getEpisode,getEpisodes,getLocation,getLocations}); | ||
//# sourceMappingURL=index.js.map |
@@ -58,3 +58,3 @@ export interface CharacterLocation { | ||
episode: string; | ||
character: string[]; | ||
characters: string[]; | ||
} | ||
@@ -61,0 +61,0 @@ export interface ApiResponse<T> { |
{ | ||
"name": "rickmortyapi", | ||
"version": "2.0.1", | ||
"version": "2.1.1", | ||
"author": "Axel Fuhrmann", | ||
@@ -5,0 +5,0 @@ "description": "The Rick and Morty API JS client", |
Sorry, the diff of this file is not supported yet
22008