diff --git a/README.md b/README.md index 45aa616..e774529 100644 --- a/README.md +++ b/README.md @@ -39,6 +39,21 @@ pf.animal.search() }); ``` +Another way if you have issues with the above code snippet and using React + +```js +import { Client } from "@petfinder/petfinder-js"; + +const pf = new Client({ + apiKey: "my-api-key", + secret: "my-api-secret", + }); + + const results = await pf.animal.search() + console.log(results.data.animals) +}; +``` + ## Usage (Node/CommonJS) ```js @@ -70,6 +85,21 @@ client.animal.search() }); ``` +## If using primary_photo_cropped, some dogs or cats won't have images. I recommend adding a placeholder like below example if using React + +```jsx + + + +``` + ## Documentation See [docs directory](docs/) for more detailed documentation.