Skip to main content
Glama

GameBrain Video Game Discovery

by ddsky
api.module.ts1.02 kB
import { NgModule, ModuleWithProviders, SkipSelf, Optional } from '@angular/core'; import { Configuration } from './configuration'; import { HttpClient } from '@angular/common/http'; @NgModule({ imports: [], declarations: [], exports: [], providers: [] }) export class ApiModule { public static forRoot(configurationFactory: () => Configuration): ModuleWithProviders<ApiModule> { return { ngModule: ApiModule, providers: [ { provide: Configuration, useFactory: configurationFactory } ] }; } constructor( @Optional() @SkipSelf() parentModule: ApiModule, @Optional() http: HttpClient) { if (parentModule) { throw new Error('ApiModule is already loaded. Import in your base AppModule only.'); } if (!http) { throw new Error('You need to import the HttpClientModule in your AppModule! \n' + 'See also https://github.com/angular/angular/issues/20575'); } } }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ddsky/gamebrain-api-clients'

If you have feedback or need assistance with the MCP directory API, please join our Discord server