(path: string, title: string, htmlContent: string)
| 571 | } |
| 572 | |
| 573 | async editPage(path: string, title: string, htmlContent: string): Promise<boolean> { |
| 574 | try { |
| 575 | const token = await this.getAccessToken(); |
| 576 | |
| 577 | const response = await HttpClient.makeRequest('https://api.telegra.ph/editPage', { |
| 578 | method: 'POST', |
| 579 | data: { |
| 580 | access_token: token, |
| 581 | path, |
| 582 | title, |
| 583 | content: [{ tag: 'div', children: [htmlContent] }] |
| 584 | } |
| 585 | }); |
| 586 | |
| 587 | return response.status === 200 && response.data.ok; |
| 588 | } catch { |
| 589 | return false; |
| 590 | } |
| 591 | } |
| 592 | } |
| 593 | |
| 594 | class GeminiClient { |
nothing calls this directly
no test coverage detected