Skip to content

MBDesu/pkmng

Repository files navigation

Pkmng

pkmng is an Angular wrapper of PokéAPI.

It features auto caching in browser storage and enumerations to help consumers figure out what to pass to the API.

Exposed Services

Exposed services (self-explanatory):

  • BerryService
  • ContestService
  • EncounterService
  • EvolutionService
  • GameService
  • ItemService
  • LocationService
  • MachineService
  • MoveService
  • PokemonService
  • UtilityService

Usage

import { Component, inject, OnInit } from '@angular/core';
import { BerryService, PkmngModule } from 'pkmng';
import { RouterOutlet } from '@angular/router';

@Component({
  selector: 'app-root',
  standalone: true,
  imports: [
    RouterOutlet,
    PkmngModule
  ],
  templateUrl: './app.component.html',
  styleUrl: './app.component.scss'
})
export class AppComponent implements OnInit {
  
  berryService = inject(BerryService);

  ngOnInit(): void {
    this.berryService.getBerry('oran').subscribe((berryData) => {
      console.log(berryData);
    });
  }
}

License

This software uses the MIT license. For more information, see LICENSE.

TODO

  • in-code documentation

This project was generated with Angular CLI version 17.3.5.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published