Giter VIP home page Giter VIP logo

spring-social-yahoo's Introduction

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

  • first version release

Notes

  • not all endpoints and functionalities are implemented from tha Yahoo Social API; if there are requests to implement some extras, please leave me a message and I will oblige with a response
  • when implementing a connection repository, note that the default JdbcUsersConnectionRepository.sql constructs a table whose max length for the access token is 255, which is less than the length of the token received from Yahoo (about 700 characters), so you need to copy the original JdbcUsersConnectionRepository.sql file and modify the max length of the accessToken column (you can go for 1000 max length)
  • you can give spring-social-yahoo a try by cloning the forked repo of spring-social-samples, available on my account at https://github.com/gabrielruiu/spring-social-samples/tree/master/spring-social-quickstart
  • most classes contain links to the Yahoo documentation website, so you can consult the information there as well
  • I would appreciate very much if you would take the time to give me a short email describing your usage of this library, just so I can get a feeling of how useful the library is

Tips

  • if you want to build a filter for the Contacts resource (see ContactsFilter), you will most likely be using several enums to construct it:
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

  • only JSON payloads are used
  • only the Contacts API is implemented
  • the following endpoints are implemented:
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

spring-social-yahoo's People

Contributors

gabrielruiu avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.