http://michaelgrinich.com/hackernews/のようなアプリを作成することにしましたが、Androidデバイスの場合、私のアイデアはWebアプリケーションバックエンドを使用します(Androidデバイス用のJavaで完全にコーディングするのではなく、PythonとWeb用にコーディングするため) 。
私が今実装しているのは次のようなものです。
$ curl -i http://localhost:8080/stories.json?page=1\&stories=1
HTTP/1.0 200 OK
Date: Sun, 25 Apr 2010 07:59:37 GMT
Server: WSGIServer/0.1 Python/2.6.5
Content-Length: 296
Content-Type: application/json
[{"title": "Don\u2019t talk to aliens, warns Stephen Hawking", "url": "http://www.timesonline.co.uk/tol/news/science/space/article7107207.ece?", "unix_time": 1272175177, "comments": 15, "score": 38, "user": "chaostheory", "position": 1, "human_time": "Sun Apr 25 01:59:37 2010", "id": "1292241"}]
次のステップ(そして私が思う最後のステップ)は投票です。私のデザインは次のようなことをしています。
$ curl -i http://localhost:8080/stories/1 -d "vote=up" -u username:password
投票します:
$ curl -i http://localhost:8080/stories/1 -d "vote=down" -u username:password
反対票を投じてください。
どうすればいいのかわかりません...ツイルを使うつもりでしたが、ログインリンクはいつも違います。例:
http://news.ycombinator.com/x?fnid=7u89ccHKln
後でAndroidアプリはこのAPIを使用します。
プログラムでハッカーニュースを閲覧した経験はありますか?