-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace brittle subscription token heuristic with explicit args (#18)
We support subscription tokens in two formats: * A string pulled from the NYT-S cookie. This is the recommended path. * A string pulled from the nyt-s HTTP header. While it appears that this header is no longer used, it still works with the NYT API and my old header-based token still works, so this is still supported. Previously, we used a brittle heuristic based on string length to determine whether a passed in token was a header or a cookie. This is now broken, as cookies are not a set length. Instead, force the user to specify via CLI arg what kind of token they're passing in. Since most people are probably using a cookie at this point, the old `-t` short arg is mapped to the cookie-based token. Fixes #17
- Loading branch information
Showing
3 changed files
with
41 additions
and
17 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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[package] | ||
name = "crossword" | ||
version = "1.2.0" | ||
version = "2.0.0" | ||
authors = ["Kesavan Yogeswaran <[email protected]>"] | ||
license = "Apache-2.0" | ||
edition = "2021" | ||
|
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