Matt Baer
a8ae32056c
Add SetClient method
2 vuotta sitten
Matt Baer
89c047d266
Support setting categories on posts
2 vuotta sitten
Matt Baer
a22b52a231
Add Client.GetMe() method
This allows client to view authenticated user's information.
2 vuotta sitten
Matt Baer
9d2c8e0dd4
Support setting application key on requests
2 vuotta sitten
Matt Baer
3ef92c5819
Add basic organization structs
2 vuotta sitten
Matt Baer
c00064f688
Support `author` parameter on posts
2 vuotta sitten
Matt Baer
22e135ac8a
Support creating an organization contributor
Ref T734
2 vuotta sitten
Matt Baer
91e1f9124d
Add Client.BaseURL() method
This allows applications to verify the environment they're interacting
with.
2 vuotta sitten
Matt Baer
155a236724
Merge pull request #23 from writeas/markdown
Support Markdown endpoint
3 vuotta sitten
Matt Baer
8d0200bd5c
Support Markdown endpoint
3 vuotta sitten
Matt Baer
645de842c4
Add post types
3 vuotta sitten
Matt Baer
b9117cab2c
Update README now that v2 is merged
4 vuotta sitten
Matt Baer
64c4bcf8fc
Change version to 2
from 2-dev
4 vuotta sitten
Matt Baer
b35223f930
Update developer.write.as -> developers.write.as
4 vuotta sitten
Matt Baer
e6d5a2e79c
Tweak "too many login reqs" error message
This explains what happened, instead of telling the user what to do.
4 vuotta sitten
Matt Baer
ada6b850c1
Revert "Merge pull request #18 from writeas/include-coll"
This reverts commit 8463946e2d6b211208c04eb6832f155865d12de3, reversing
changes made to 8cf5d50560
.
5 vuotta sitten
Rob j Loranger
8463946e2d
Merge pull request #18 from writeas/include-coll
include collection and id in postparams
5 vuotta sitten
Rob Loranger
3e525f7a24
include collection and id in postparams
this changes the JSON tags to include both the ID and Collection
in PostParams. Both will be omitted when empty to maintain any unknown
backwards compatibility.
5 vuotta sitten
Matt Baer
8cf5d50560
Merge branch 'v2'
5 vuotta sitten
Rob Loranger
064e8a36c8
do not exclude ID in OwnedPostParams
5 vuotta sitten
Rob Loranger
268710536d
use POST for claim posts endpoint
5 vuotta sitten
Rob Loranger
de8ce4dcd2
closes T589 update tests to use dev client
this changes tests to only use the dev client as all code is shared
between that and the write.as client, just the host changes.
also updated post tests to round trip and test over sub tests
5 vuotta sitten
Rob Loranger
7c3a6949d5
fixes failing tests
tests were failing on expected write.as blog title
previously the title was 'write.as' and it is now 'write.as blog'
also removed test case ExampleClient_GetCollection as was a duplicate of
TestGetCollection
5 vuotta sitten
Rob Loranger
a853522f69
adds GetCollectionPost
this adds a client method to retrieve a collection post along with basic
tests - phabricator task T588
5 vuotta sitten
Matt Baer
8728275c31
`Set` User-Agent header instead of `Add`ing it
5 vuotta sitten
Matt Baer
801952e0b5
Merge pull request #13 from abhinav/delete-collection
collection: Add support for deletion
5 vuotta sitten
Matt Baer
7a2c93ae6d
Revert "DeleteCollection: Make params a struct"
This reverts commit 1d34eede72
.
5 vuotta sitten
Matt Baer
1a39cf8c38
Merge pull request #15 from SamWhited/support_modules_v2
Support modules
5 vuotta sitten
Matt Baer
68e987de6e
Merge pull request #12 from abhinav/goimports
style: Run goimports on everything
5 vuotta sitten
Matt Baer
062df41a63
Add Slug, Created, and Updated to PostParams
for creating or updating posts.
5 vuotta sitten
Matt Baer
d4fd65f9c0
Add Description to CollectionParams
for creating a new collection.
5 vuotta sitten
Matt Baer
ec51782fe3
Merge pull request #10 from SamWhited/support_modules
Support Go Modules
5 vuotta sitten
Sam Whited
3fb123eead
Support Go Modules
5 vuotta sitten
Sam Whited
d577f3277f
Support Go Modules
5 vuotta sitten
Abhinav Gupta
1d34eede72
DeleteCollection: Make params a struct
Rather than accepting a naked string, accept a DeleteCollectionParams
struct so that new optional parameters can be added in the future
without breaking the API.
5 vuotta sitten
Abhinav Gupta
f962e5052b
collection: Add support for deletion
This adds support for deleting collections.
Resolves #1 .
5 vuotta sitten
Abhinav Gupta
993ee50b3d
style: Run goimports on everything
Similar to writeas/writeas-cli#22 , this change runs goimports on all
files and changes the recommendation in the Contributing section to do
the same.
5 vuotta sitten
Matt Baer
68cbee8f4a
Merge pull request #9 from abhinav/v2
Add NewClientWith constructor
5 vuotta sitten
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
5 vuotta sitten
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.
5 vuotta sitten
Matt Baer
9f0a63ee86
Add Version constant
5 vuotta sitten
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.
5 vuotta sitten
Matt Baer
2564207297
Return actual error message when request fails
5 vuotta sitten
Matt Baer
5d3a329a7a
Rearrange status checks in CreatePost
5 vuotta sitten
Matt Baer
ca804e86e2
Fix "problem {x}ing post" copy-pasted error messages
Previously, they all said the same thing
5 vuotta sitten
Matt Baer
cffca70254
Add v2 warning in README
5 vuotta sitten
Matt Baer
b88b7e4e51
Reflect breaking v2 changes in examples and tests
5 vuotta sitten
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
5 vuotta sitten
Matt Baer
cf3c150ac9
Fix examples in README
5 vuotta sitten
Matt Baer
50941b5d00
Use versioned library URL
5 vuotta sitten