Jhbate/add to seagull

@cheddar could you do a quick check of this please? I left the call to collections generic (rather than specialised for profile / groups ) for the flexibility it gives me at this stage. 
Thanks Eric

"seems ok" and "really annoys" you :) - ha ha

I was following the pattern of the decoders used in go and passing in a
generic interface. This was because the collection could be anything (well
kinda :)) and felt that this was the 'easiest' way at this stage.

I guess I could change it for the specific case of getting a profile (which
is my current use case) or leave it as is but consider going forward ?? Any
opinion?

On Tue, Oct 7, 2014 at 12:09 PM, cheddar <notifications@github.com> wrote:

> In clients/seagull.go:
>
> > @@ -82,6 +93,44 @@ func (client *seagullClient) GetPrivatePair(userID, hashName, token string) *Pri
> >  	return &retVal
> >  }
> >
> > +/*
> > + *	Retrieves arbitrary collection information from metadata
> > + *
> > + *  userID -- the Tidepool-assigned userId
> > + *  collectionName -- the collection being retrieved
> > + *  token -- a server token or the user token
> > + *  v - the interface to return the value in
> > + */
> > +func (client *seagullClient) GetCollection(userID, collectionName, token string, v interface{}) error {
>
> This seems ok. I guess the only thing that really annoys me is that there
> is an extra contract that the interface{} you are passing in is setup to
> properly deserialize JSON into itself. It would be really nice if that were
> encapsulated rather than exposed.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/tidepool-org/go-common/pull/6/files#r18491886>.
>