Skip to content

Diagnoster/CS2Cyclopedia

Repository files navigation

img

CS2Cyclopedia API

API built with Angular 19 and Angular Material, providing access to information about cases, items, stickers, and much more related to the CS2 universe.


imgTechnologies Usedimg

This project was generated with Angular CLI version 19.

angular material html5 css3 typescript


imgHow to Useimg

Installation:

To get started, make sure the following tools are installed on your machine:

  1. Download and install Node from the official website:
    https://nodejs.org/
    
  2. You can verify if Node.js is installed by running the following command in your terminal:
    node -v
    
  3. Install Angular CLI via npm after installing Node.js:
    npm install -g @angular
    
  4. Then, check if the CLI was installed successfully with:
    ng version
    

imgRunningimg

  1. Clone this repository:
    git clone https://github.com/Diagnoster/CS2Cyclopedia.git
  2. Navigate to the project directory:
    cd repository
  3. Install project dependencies:
    npm install
  4. Start Angular Application:
    ng serve -o
    

CS2 Price Service

🔎 Price Lookup

The application fetches item prices directly from the counter-strike-price-tracker repository, which maintains a latest.json file updated daily with the most recent prices for all tradable CS2 items.

To optimize performance and reduce server load:

  • The file is fetched only once and cached in memory and localStorage.
  • Subsequent requests reuse this cache without additional network calls.
  • The service API (Cs2PriceService) provides methods to retrieve all prices or get the price of a specific item by its market hash name.

📌 Usage Example

import { Component, OnInit } from '@angular/core';
import { Cs2PriceService } from './services/cs2-price.service';

@Component({
  selector: 'app-root',
  template: `
    <div *ngIf="akPrice">
      AK-47 | Redline price: {{ akPrice }} €
    </div>
  `
})
export class AppComponent implements OnInit {
  akPrice: number | null = null;

  constructor(private priceService: Cs2PriceService) {}

  ngOnInit() {
    this.priceService.getItemPrice('AK-47 | Redline').subscribe(price => {
      this.akPrice = price;
    });
  }
}

imgFurther Helpimg

To get more help on the Angular CLI use ng help or go check out the Angular CLI Overview and Command Reference page.

Angular Material Components provide a set of reusable, well-designed UI components that follow the Material Design guidelines. You can check them out here: Angular Material Components

To deploy this application, you can use Netlify for free hosting with SSR support.


imgCreditsimg

Credits to ByMykel for providing the API for data retrieval:
https://github.com/ByMykel/CSGO-API
https://github.com/ByMykel/counter-strike-price-tracker


imgAboutimg

This software is 100% free, open-source and unlicensed.

About

Cyclopedia in angular, with information and data about items, boxes, skins from the game Counter Strike 2.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published