gabrielruiu / spring-social-yahoo

Spring Social Yahoo is an extension based on Spring Social that provides funcationality to communicate with the Yahoo Social Rest API.
Other
2 stars 2 forks source link

spring-social-yahoo

Build Status

Spring Social Yahoo is an extension based on Spring Social that provides functionality to communicate with the Yahoo Social Rest API. You can find the full documentation at Yahoo's developer website. Before proceeding with using this library, please consult the Notes section. The best way to learn how use the library is to consult the Spring Social documentation and apply those principles for the classes specific to Yahoo.

Do not hesitate to point out any issues and I am very open to suggestions, both in terms of implementation and documentation

Changelist

1.0.0.RELEASE

Notes

Tips

ContactsFilter filter = new ContactsFilter()
        .withAndFilter(FieldType.EMAIL, SearchFilter.SearchFilterKey.PRESENT, "1")
        .sortBy(FieldType.EMAIL)
        .sortOrder(SortOrder.Order.DESC);
Contacts contacts = yahoo.contactsOperations().getContacts(filter);

These enums can take up some space on a single line, so to reduce the clutter, use static imports for each enum:

import static org.springframework.social.yahoo.filter.SearchFilter.SearchFilterConstraint.PRESENT;
import static org.springframework.social.yahoo.filter.SortOrder.Order.DESC;
import static org.springframework.social.yahoo.module.FieldType.EMAIL;

///other code
ContactsFilter filter = new ContactsFilter()
        .withAndFilter(EMAIL, PRESENT, "1")
        .sortBy(EMAIL)
        .sortOrder(DESC);
Contacts contacts = yahoo.contactsOperations().getContacts(filter);

At the time of writing (December 2014)

What is supported

Resource Methods Notes
Contacts GET
Contacts by category name GET
Contacts filtering GET
Contact GET
Categories GET
Categories by contact cid GET API returns a 404 response