Matt Baer
d4fd65f9c0
Add Description to CollectionParams
for creating a new collection.
há 5 anos
Matt Baer
68cbee8f4a
Merge pull request #9 from abhinav/v2
Add NewClientWith constructor
há 5 anos
Abhinav Gupta
2ad70a7602
Add NewClientWith constructor
This adds a new constructor to build Clients which operates on a Config
struct rather than positional parameters. This will enable adding new
parameters in the future without breaking the API.
To begin with, this introduces a new URL parameter that wasn't
previously available. An example of another parameter that could be
added in the future is the timeout (to override the default timeout).
Existing constructors have been transitioned to the new one because it
implements a superset of their functionality.
Minor note: The Tor constructor wasn't respecting the default timeout
but with this version, it does.
Resolves #8
há 5 anos
Matt Baer
cbbd4ec209
Pass along edit token on post update
Fixes bug introduced when we moved `Token` into the func's parameters,
out of PostParams.
há 5 anos
Matt Baer
9f0a63ee86
Add Version constant
há 5 anos
Matt Baer
470dc287c6
Move update params in Update|DeletePost
Moves the ID and token params out of PostParams and into the func's
parameters. A currently-unused `collection` parameter is left in for the
future, when the backend supports updating and deleting collection posts
via slug, not post ID.
há 5 anos
Matt Baer
2564207297
Return actual error message when request fails
há 5 anos
Matt Baer
5d3a329a7a
Rearrange status checks in CreatePost
há 5 anos
Matt Baer
ca804e86e2
Fix "problem {x}ing post" copy-pasted error messages
Previously, they all said the same thing
há 5 anos
Matt Baer
cffca70254
Add v2 warning in README
há 5 anos
Matt Baer
b88b7e4e51
Reflect breaking v2 changes in examples and tests
há 5 anos
Matt Baer
b7c23e245e
Version 1, with a better README
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
iQIcBAABAgAGBQJbp/4UAAoJEJxM46J9Yqb7mYUP/RT3bfmwkYxQuo37eTpRICLh
F4i+mTfVIpgZtxIp8q3TFQxaTYC4rVqT5Cpld4mFE3WDlSQvQW/CeWygLuVMA8v1
ifd4iIruymw/avqauDcG1XUYQHksr0czFVE7PEvWLTvPznOLjgIOrnQOGAWoWx5P
Pw3k0UU9bjiDd8+wjwfZDIBLrMcR3wtZwuiUWnqN+jKIaLUHM/GHr/qaD4j9xGK5
/65/y1giDUoBYcIAt3xJzw3LkH15JXdkUsX3z5ZR4Z0ymbjC5Tatc2O0/PN4rQdP
ZH/MzSbnTVX6BsgVr3DyvvcdtWndOa0xyvT97ZKtEz8Ca2O2Jo3A1vwFXddBqmqu
649c3oza75wDWkI4NqW7Xb9+rWpvsYeHi46QQhxTM2PFjvQ91pL3csBGqhtTqlOv
LMG/0UIed/vbGqEUw+XKRdeIG+mtxbhBO1mfqGlcq/6kkawBH8aUV/hHi+XwuO/M
VFz9D1FSIZyu1DhAnsmBDz20UmbE5xBAEd57h/1dB2fkNY8f2GUuvqB5qVbTeuT/
QxpW6Cg4SWWkdgc+Ytnh2YwTk5DYVcB/RARqnWDtLyWlQl00EJjzuDQdIKHxS2Rt
DdA0CxQeh8RnuBD6nHUzJuFT/kEtwqvCm8jvNv1BrAoz0aiFiSwL2WBgqEyBXxCL
Jcm/0UNbuyZ0GY0W+oz2
=Mdk/
-----END PGP SIGNATURE-----
Merge tag 'v1.1'
Version 1, with a better README
há 5 anos
Matt Baer
cf3c150ac9
Fix examples in README
há 5 anos
Matt Baer
50941b5d00
Use versioned library URL
há 5 anos
Matt Baer
2915667895
Rearrange status checks in UpdatePost
há 5 anos
Matt Baer
f8191a8ea4
Rearrange status checks in LogIn
há 5 anos
Matt Baer
78fe498545
Rearrange status checks in CreateCollection
há 5 anos
Matt Baer
b8261ce08b
Add authentication test
há 5 anos
Matt Baer
9b40a6fb2d
Fix post tests
há 5 anos
Matt Baer
ed584d036d
Support unpinning posts
há 5 anos
Matt Baer
d3ace8c73b
Support pinning posts
há 5 anos
Matt Baer
afa9ecff12
Automatically set access token on client on login
há 5 anos
Matt Baer
21dfda1c03
Add `updated` property on posts
há 5 anos
Matt Baer
253cf3cf19
Support retrieving auth'd user's collections
há 5 anos
Matt Baer
5e85229ef2
Fix collection_test log
há 5 anos
Matt Baer
ff3f1ff4c8
Support fetching user posts
há 5 anos
Matt Baer
9ca15ff6c3
Support logging out
há 5 anos
Matt Baer
663252fb00
Add Token getter
há 5 anos
Matt Baer
9589188422
Add URL property on Collection
há 5 anos
Matt Baer
c1d801f60d
Move OwnedPostParams fields into PostParams
há 5 anos
Matt Baer
0eb2666d0f
Support using custom User-Agent
há 5 anos
Matt Baer
813147cf6d
Support interacting with Tor hidden service
This uses a local proxy to communicate over Tor. Code is from the
writeas-cli.
há 5 anos
Matt Baer
b9ad92a1e1
Fix GetPost test looking for dev post
há 5 anos
Matt Baer
f33e2ee887
Support interacting with dev API
há 5 anos
Matt Baer
64dec060b2
Merge pull request #7 from ProfessorTom/remove_unreachable_code
removed unreachable code
há 5 anos
Matt Baer
159315bfd1
Merge pull request #6 from ProfessorTom/fix_error_format_verbs
use correct verb for error formatting
há 5 anos
Tomas Gallucci
bbb412e20d
removed unreachable code
há 5 anos
Tomas Gallucci
4d5bb5a8b0
use correct verb for error formatting
há 5 anos
Matt Baer
af709fa4e1
Alter guidelines to request documenting only exported funcs
há 6 anos
Matt Baer
fbe1c5830b
Add expected output on examples
há 6 anos
Matt Baer
b2c6f21081
Make README example more cohesive
há 6 anos
Matt Baer
1864082f94
Add post creation GoDoc example
há 6 anos
Matt Baer
c683b3c46e
Add UserSubscription struct
há 6 anos
Matt Baer
8d18951a99
Rearrange collection.go func order
há 6 anos
Matt Baer
f4196014b5
Support fetching collection posts
This closes #3
há 6 anos
Matt Baer
0b345f879d
Add GitHub issue template
há 6 anos
Matt Baer
16f713f560
Mention that Crosspost parameter is only for post creation
há 6 anos
Matt Baer
71e8a2f11a
Support publishing posts to a collection
há 6 anos
Matt Baer
8425a91fe1
Fix `else` block lint errors
há 6 anos
Matt Baer
ecf5bd883a
Use new API docs URL
writeas.github.io/docs -> developer.write.as/docs/api
há 6 anos