-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathREADME
52 lines (42 loc) · 1.69 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
Web.GooglePlus
------------
Haskell implementation of the GooglePlus api. For more info, see
http://developers.google.com/+/api/
Installation
------------
Requires that you have cabal installed. I've included a Makefile for convenience. To install run `make install`
Alternatively, you can install this from Hackage:
`cabal install googleplus`
Documentation
-------------
`make doc` will generate a doc directory. Point your browser at the index.html to see the Haddock documentation.
Brief Example
-------------
This example is included in the documentation of the Web.GooglePlus:
{-# LANGUAGE OverloadedStrings #-}
import Web.GooglePlus
import Web.GooglePlus.Monad
import Web.GooglePlus.Types
import Control.Monad.Reader
import Data.Text (unpack)
doStuff :: GooglePlusM ()
doStuff = do
Right person <- getPerson Me
Right feed <- getActivityFeed Me PublicCollection
-- ...
return ()
main :: IO ()
main = do
runReaderT (unGooglePlusM doStuff) env
where env = GooglePlusEnv { gpAuth = APIKey "MYKEY" }
Bugs
----
Use the issue tracker on github for bugs. I'll do my best to get them resolved
as soon as I can. One thing you may encounter is a parse error (resulting in a
Left value) in some of the API calls talking about a key missing. I've tried to
weed these out as much as possible but this is a result of Google not
explicitly specifying what fields will always be present. I've had to just feed
live data through the code to figure out what fields aren't always there. This,
consequently, is why there are so many Maybe fields in the datatypes. If you
spot one of these parse errors, please tell me right away so I can correct the
types.