Extract shard ID from an Evernote developer token
(token: string)
| 62 | |
| 63 | /** Extract shard ID from an Evernote developer token */ |
| 64 | function extractShardId(token: string): string { |
| 65 | const match = token.match(/S=s(\d+)/) |
| 66 | if (!match) { |
| 67 | throw new Error('Invalid Evernote token format: cannot extract shard ID') |
| 68 | } |
| 69 | return `s${match[1]}` |
| 70 | } |
| 71 | |
| 72 | /** Get the NoteStore URL for the given token */ |
| 73 | function getNoteStoreUrl(token: string): string { |