From 2d1425af5e13e1b705e8bc14fb2cbb8563eb296b Mon Sep 17 00:00:00 2001 From: Steve M Date: Tue, 1 Oct 2024 19:53:01 -0400 Subject: [PATCH] Copilot doc changes --- .../PositionCodesCopilot.md | 0 src/Copilot/SportsPositionSuggestion.md | 61 ------------------- 2 files changed, 61 deletions(-) rename src/{app/staticdata => Copilot}/PositionCodesCopilot.md (100%) delete mode 100644 src/Copilot/SportsPositionSuggestion.md diff --git a/src/app/staticdata/PositionCodesCopilot.md b/src/Copilot/PositionCodesCopilot.md similarity index 100% rename from src/app/staticdata/PositionCodesCopilot.md rename to src/Copilot/PositionCodesCopilot.md diff --git a/src/Copilot/SportsPositionSuggestion.md b/src/Copilot/SportsPositionSuggestion.md deleted file mode 100644 index 80f6ad3..0000000 --- a/src/Copilot/SportsPositionSuggestion.md +++ /dev/null @@ -1,61 +0,0 @@ -Here is the documentation for the StaticDataService class and its GetPositionCodes method: - -StaticDataService Documentation -Overview -The StaticDataService class provides methods to fetch static data from the API. It is designed to be used as an injectable service in Angular applications. - -Dependencies -HttpClient from @angular/common/http -Injectable from @angular/core -Observable from rxjs -environment from src/environments/environment -PositionCodesDTO from ./positioncodes -Service Definition - import { HttpClient } from '@angular/common/http'; - import { Injectable } from '@angular/core'; - import { Observable } from 'rxjs'; - import { environment } from 'src/environments/environment'; - import { PositionCodesDTO } from './positioncodes'; - - @Injectable({ - providedIn: 'root' - }) - export class StaticDataService { - baseURL = environment.apiUrl; - - constructor( - private http: HttpClient - ) { } - - GetPositionCodes(sport: string): Observable { - return this.http.get(this.baseURL + 'staticdata/positions?sport=' + sport); - } - } - -Properties -baseURL -Type: string -Description: The base URL for the API, retrieved from the environment configuration. -Constructor -constructor(http: HttpClient) -Parameters: -http: An instance of HttpClient used to make HTTP requests. -Methods -GetPositionCodes -Signature: GetPositionCodes(sport: string): Observable -Parameters: -sport: A string representing the sport for which to fetch position codes. -Returns: An Observable of an array of PositionCodesDTO. -Description: This method fetches position codes for a given sport from the API. -Usage Example -To use the StaticDataService in a component, follow these steps: - -Inject the StaticDataService into your component. -Call the GetPositionCodes method with the appropriate sport parameter. -Subscribe to the Observable returned by GetPositionCodes to get the position codes. -Example Component -Example Template -Module Declaration -Make sure to declare the component in your module: - -This documentation provides an overview of the StaticDataService class, its dependencies, properties, methods, and an example of how to use it in an Angular component. \ No newline at end of file