5.0.2 • Published 6 years ago

neopet-image-finder v5.0.2

Weekly downloads
5
License
ISC
Repository
github
Last release
6 years ago

neopet-image-finder

Downloads Version Travis

neopet-image-finder is a very simple module that obtains the pet image links for a Neopet with a given size and mood, searchable by name. Usage is extremely simple:

const petImage = require('neopet-image-finder');

petImage('Pikachu53535').then(data => console.log(data)).catch(console.error);

The response would be similar to this:

{
	data: <Buffer>,
	url: 'http://pets.neopets.com/cp/jd68fd89/1/5.png'
}

It returns a promise, so you can await it as well. If the pet is not found, it returns null instead.

try {
	const data = await petImage('Pikachu53535');
	if (!data) return null;
	console.log(data.url);
} catch (err) {
	console.error(err);
}

There are also two options you can specify, size and mood.

petImage('Pikachu53535', { size: 2, mood: 4 }).then(data => console.log(data.url)).catch(console.error);

Sizes: 1. 50x50, Portrait 2. 150x150 3. 80x80 4. 300x300 5. 500x500 (Default) 6. 150x150, Portrait 7. 640x640

Moods: 1. Happy (Default) 2. Sad 3. Angry 4. Sick 5. No Mouth or Eyes

Both are entirely optional, and will simply default to 500x500 and Happy if not specified.

5.0.2

6 years ago

5.0.1

6 years ago

5.0.0

6 years ago

4.0.1

6 years ago

4.0.0

6 years ago

3.0.11

6 years ago

3.0.10

6 years ago

3.0.9

6 years ago

3.0.8

6 years ago

3.0.7

6 years ago

3.0.6

6 years ago

3.0.5

7 years ago

3.0.4

7 years ago

3.0.3

7 years ago

3.0.2

7 years ago

3.0.1

7 years ago

3.0.0

7 years ago

2.0.7

7 years ago

2.0.5

7 years ago

2.0.4

7 years ago

2.0.3

7 years ago

2.0.2

7 years ago

2.0.1

7 years ago

2.0.0

7 years ago

1.2.5

7 years ago

1.2.4

7 years ago

1.2.3

7 years ago

1.2.2

7 years ago

1.2.1

7 years ago

1.2.0

7 years ago

1.1.0

7 years ago

1.0.0

7 years ago