[Haskell-cafe] Writing a web service client

Ionut G. Stan ionut.g.stan at gmail.com
Tue May 25 08:27:51 EDT 2010


Hello,

Thanks for all the links. It seems that I have a lot to study before I 
produce a decent library :)

The Network.HTTP package looks nice too. It seems to be at the right 
level of abstraction compared to Network.Browser.


I have to get used with searching the Hackage repository... :)


On 5/25/10 3:12 PM, Christopher Done wrote:
> Hello Ionut,
>
> On 25 May 2010 13:26, Ionut G. Stan<ionut.g.stan at gmail.com>  wrote:
>> The first step that I want to undertake is to write a client library for the
>> GitHub API, so my questions would be:
>>
>> 1. Is there any such library?
>
> I don't know of nor have seen such a library on Hackage or Github.
> There was some brief talk on StackOverflow[1], but nothing about a
> full library. I would be interested in using such a library as I am an
> enthusiastic user of Github.
>
> [1]: http://stackoverflow.com/questions/1816092/using-the-github-gist-api-from-haskell
>
>> 2. What other client library should I consider as an API model? Or maybe
>> there's some paper/blog post on how do design a Haskell API?
>
> There are some good examples of Haskell code that uses REST-ish
> APIs.[1][2][3][4]
>
> Regarding designing a Haskell API, Real World Haskell has some
> chapters about that.[5]
>
> My personal advice would be at least to ensure you make it
> cabal-install-able, so that entails having a proper cabal file,
> documented with Haddock format, with QuickCheck test cases if
> appropriate, and provide one or two examples in the documentation, see
> Don's guide about writing a Haskell program[8].
>
> [1]: http://hackage.haskell.org/package/flickr
> [2]: http://hackage.haskell.org/package/twitter
> [3]: http://hackage.haskell.org/package/feed-cli
> [4]: http://hackage.haskell.org/package/Bitly
> [5]: http://book.realworldhaskell.org/read/writing-a-library-working-with-json-data.html
> [6]: http://book.realworldhaskell.org/read/io-case-study-a-library-for-searching-the-filesystem.html
> [7]: http://book.realworldhaskell.org/read/advanced-library-design-building-a-bloom-filter.html
> [8]: http://www.haskell.org/haskellwiki/How_to_write_a_Haskell_program
>
>> 3. What network package do people use for accessing simple, rest-like web
>> services? Network.Curl? If not, which other?
>
> Network.Curl is OK but it relies on a C library which is another
> dependency and it's maybe preferable to use the HTTP library or
> similar library written in pure Haskell, that you can find on Hackage.
>

-- 
Ionuț G. Stan  |  http://igstan.ro


More information about the Haskell-Cafe mailing list