From 63d339567bf6d848f3e33deca60fe3c1d74edd7d Mon Sep 17 00:00:00 2001 From: Aleksandr Soloshenko Date: Fri, 29 Nov 2024 14:02:49 +0700 Subject: [PATCH] [docs] update links to the repo, api and web-sites --- README.md | 16 ++++++++-------- bun.lockb | Bin 9108 -> 9490 bytes package.json | 10 +++++----- src/client.test.ts | 10 +++++----- src/client.ts | 4 ++-- 5 files changed, 20 insertions(+), 20 deletions(-) diff --git a/README.md b/README.md index dadfadb..d6bbbf7 100644 --- a/README.md +++ b/README.md @@ -1,16 +1,16 @@ ![npm](https://img.shields.io/npm/v/android-sms-gateway?style=for-the-badge) ![License](https://img.shields.io/badge/license-Apache--2.0-blue?style=for-the-badge) ![Downloads](https://img.shields.io/npm/dw/android-sms-gateway?style=for-the-badge) -![GitHub issues](https://img.shields.io/github/issues/capcom6/android-sms-gateway-ts?style=for-the-badge) -![GitHub stars](https://img.shields.io/github/stars/capcom6/android-sms-gateway-ts?style=for-the-badge) - - - +![GitHub issues](https://img.shields.io/github/issues/android-sms-gateway/client-ts?style=for-the-badge) +![GitHub stars](https://img.shields.io/github/stars/android-sms-gateway/client-ts?style=for-the-badge) + + + # SMS Gateway for Androidâ„¢ JS/TS API Client -This is a JavaScript/TypeScript client library for interfacing with the [SMS Gateway for Android API](https://sms.capcom.me). +This is a JavaScript/TypeScript client library for interfacing with the [SMS Gateway for Android API](https://sms-gate.app). ## Features @@ -98,7 +98,7 @@ apiClient.getState(messageId) ## API Reference -For more information on the API endpoints and data structures, please consult the [SMS Gateway for Android API documentation](https://sms.capcom.me/integration/api/). +For more information on the API endpoints and data structures, please consult the [SMS Gateway for Android API documentation](https://docs.sms-gate.app/integration/api/). # Contributing @@ -106,4 +106,4 @@ Contributions are welcome! Please submit a pull request or create an issue for a # License -This library is open-sourced software licensed under the [Apache-2.0 license](LICENSE). \ No newline at end of file +This library is open-sourced software licensed under the [Apache-2.0 license](LICENSE). diff --git a/bun.lockb b/bun.lockb index 32ed196ba3114b427ce7fe3b38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IfnMbj|3)sG0xH~n0%O~d<6#<)d<7_=3U|>a=FOybSh_r0=0+R4Q*-{=y(By z5M2{p7LAmPU@;URN^-iO8W)ySfqzp>nMLBF0#Nk`{tG4l82luRHYQvY$n2*QQUVG7 zQcM5$6zjz&I0oN|#fW8%p=r>W(S9WS%1ce|iJP@KmFwqI^OE0r$iB4w#mBysFI;R* zy}hzSyD$~@!Lg{BFmYeS;kd0IHJr)M%@UtE`LVM-0q@PRRqZMkglZE2VeHD?-?WuJ zon2N_W&5dpyfA;^uKtaU)5G1}23zQ_H?Hm-csV?2@E&vHLZR#7=-w@2)|mcO%;uh= z*tu7KdoS7hJ%b-L#U&Uo5T3q!0ED&8H&ztV>u6u9;4=!2&=1S6733Jg^* z_x4==trO3o-s#Jc&M>E}C6TJXEVIK`YFbq8tQ|#h1@In_UTuC7@|-jsH1e zRE!@+({!KdS$M-@N(>C$>Bk4A3T~d5=eb6^Y?sp*yY7GZDHb?y$pM`;#k>=T5&bd_ zyPcC { message, { "Content-Type": "application/json", - "User-Agent": "android-sms-gateway/1.0 (client; js)", + "User-Agent": "android-sms-gateway/2.0 (client; js)", Authorization: expect.any(String), }, ); @@ -69,7 +69,7 @@ describe('Client', () => { expect(mockHttpClient.get).toHaveBeenCalledWith( `${BASE_URL}/message/${messageId}`, { - "User-Agent": "android-sms-gateway/1.0 (client; js)", + "User-Agent": "android-sms-gateway/2.0 (client; js)", Authorization: expect.any(String), }, ); @@ -89,7 +89,7 @@ describe('Client', () => { expect(mockHttpClient.get).toHaveBeenCalledWith( `${BASE_URL}/webhooks`, { - "User-Agent": "android-sms-gateway/1.0 (client; js)", + "User-Agent": "android-sms-gateway/2.0 (client; js)", Authorization: expect.any(String), }, ); @@ -116,7 +116,7 @@ describe('Client', () => { req, { "Content-Type": "application/json", - "User-Agent": "android-sms-gateway/1.0 (client; js)", + "User-Agent": "android-sms-gateway/2.0 (client; js)", Authorization: expect.any(String), }, ); @@ -131,7 +131,7 @@ describe('Client', () => { expect(mockHttpClient.delete).toHaveBeenCalledWith( `${BASE_URL}/webhooks/test`, { - "User-Agent": "android-sms-gateway/1.0 (client; js)", + "User-Agent": "android-sms-gateway/2.0 (client; js)", Authorization: expect.any(String), }, ); diff --git a/src/client.ts b/src/client.ts index fc90bce..bc14c26 100644 --- a/src/client.ts +++ b/src/client.ts @@ -1,7 +1,7 @@ import { Message, MessageState, RegisterWebHookRequest, WebHook } from "./domain"; import { HttpClient } from "./http"; -export const BASE_URL = "https://sms.capcom.me/api/3rdparty/v1"; +export const BASE_URL = "https://api.sms-gate.app/3rdparty/v1"; export class Client { private baseUrl: string; @@ -12,7 +12,7 @@ export class Client { this.baseUrl = baseUrl; this.httpClient = httpClient; this.defaultHeaders = { - "User-Agent": "android-sms-gateway/1.0 (client; js)", + "User-Agent": "android-sms-gateway/2.0 (client; js)", "Authorization": `Basic ${btoa(`${login}:${password}`)}`, } }