Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve batch handling of tags #6

Open
johanmynhardt opened this issue Feb 4, 2016 · 5 comments
Open

Improve batch handling of tags #6

johanmynhardt opened this issue Feb 4, 2016 · 5 comments
Assignees

Comments

@johanmynhardt
Copy link
Contributor

For example, when creating multiple tags on a post, it might be better to create the tags and then set them in a batch instead of updating the post each time a tag is added.

@pborgesalves
Copy link

Hi Johan,
When I try to create a post with an existing tag, the tag is not associated with the post in wordpress. In the builder, using the function PostBuilder withCategories(Term[] terms) or PostBuilder withCategories(List categoryIds) don't affect the end result.
Can you confirm to me if it is an issue?
Thank you

@pborgesalves
Copy link

Got it, I can use createPostTag instead.
Thank you anyway.

@johanmynhardt
Copy link
Contributor Author

Hi @pborgesalves,

Thank you for your feedback. I will have to take a look. There is a test in which a post is created with a particular category, although you are referring to tags but mention category methods. Tags and Categories are not exactly the same (Categories being hierarchical and Tags not.)

I do see that there's no builder method for Tag/s so I will add that and then I can resolve #6 as well!

@johanmynhardt
Copy link
Contributor Author

Hi @pborgesalves

I have stabilised 4.8.1 that will allow you to use the builder method .withTags(Term... tags) or .withTags(List<Long> tagIds) with existing Tag terms.

It will take a while before available on Maven Central.

@johanmynhardt
Copy link
Contributor Author

<dependency>
  <groupId>com.afrozaar.wordpress</groupId>
  <artifactId>wp-api-v2-client-java</artifactId>
  <version>4.8.1</version>
</dependency>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants