-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
migrate examples to openApi part 15; affects [pingpong polymart spige…
…t] (#9561) * migrate some services from examples to openApi also move common pingpong bits into a base class * improve descriptions
- Loading branch information
Showing
13 changed files
with
171 additions
and
164 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { BaseJsonService, InvalidParameter } from '../index.js' | ||
|
||
export const description = ` | ||
[PingPong](https://pingpong.one/) is a status page and monitoring service. | ||
To see more details about this badge and obtain your api key, visit | ||
[https://my.pingpong.one/integrations/badge-status/](https://my.pingpong.one/integrations/badge-status/) | ||
` | ||
|
||
export const baseUrl = 'https://api.pingpong.one/widget/shields' | ||
|
||
export class BasePingPongService extends BaseJsonService { | ||
static category = 'monitoring' | ||
|
||
static validateApiKey({ apiKey }) { | ||
if (!apiKey.startsWith('sp_')) { | ||
throw new InvalidParameter({ | ||
prettyMessage: 'invalid api key', | ||
}) | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.