Issue #2 resolved

Display Events

Tobias Duehr avatarTobias Duehr created an issue

The newsfeed on the homepage of bitbucket is pretty cool - It would be nice if we could provide the same content in bitbeaker.

Problem: The API provides events, but these are sorted funny and don't provide all information that's needed. Docs:

Workaround: Maybe we can utilize the provided RSS-Feed of the newsfeed?

Comments (19)

  1. Tobias Duehr

    Works for me too now, maybe just a temporary issue.

    Back to the topic. The problem with the RSS-feed is that there is an unique token appended to it. The user would have to enter it separately, which is kinda cumbersome.

    For me this is not worth the effort right now. Bitbucket should really add this to their API, but instead they removed the Events description completely from the docs.

  2. Ville Saalo

    I actually implemented this using the API in commits 9bbffba and 3210f35 a couple of weeks ago, so I guess this issue can be closed? :) The API doesn't really provide many details for events, and trivial things like issue numbers for issue-related events are actually omitted, but I think it's still much better than nothing. I actually opened a couple of tickets to the Bitbucket master issue tracker regarding the API back then.

    Edit/Add: The issues I created are these:

  3. Ville Saalo

    Hmm, I think I originally misunderstood the issue: this was about the main newsfeed for your user account and not about the repository news. Then I stand corrected: this isn't implemented yet.

  4. Ville Saalo

    Alright, I started implementing this feature with changeset 7de99f4. For now you cannot actually access this feature from within the app, and the username and token are hardcoded.

    My grand idea is that we augment LauncherActivity to understand URLs in the format "" so that when the user clicks on the RSS feed in their browser, they could choose to open it in Bitbeaker, at which point Bitbeaker would also save the token, so the user wouldn't have to enter it manually. Of course now that we have a nice SettingsActivity we could add a place for entering the token manually as well.

    Also, we need to think of a place for the newsfeed in the app. My idea is to have it as a third tab in the initial view, next to your repos and your favorites, if it still fits there. That should be doable even though RepositoriesActivity is one activity and NewsfeedActivity is another, using the support library ( and something called fragments.

  5. Ville Saalo

    Committed 9d0f5dd, 807bd81 and a84dd74. You still cannot access the newsfeed from within the app, but the LauncherActivity now correctly catches a newsfeed URL and launches the NewsfeedActivity. While at it, NewsfeedActivity also saves the token. Note that one token should be enough, as there's no way for you to get other people's tokens besides by asking them, and they probably wouldn't give it to you as the stream may contain events from their private repos as well.

    It seems that the <p> tags in the stream cause quite ugly margins in the list items, they probably need to be stripped out.

  6. Juha Kuitunen

    Ville Saalo With wrong token you get a Toast message saying problem with downloading RSS feed in addition to that normal error message of connection problems. With empty token small help text is displayed, and in this state clicking update button in actionbar will cause a crash.

  7. Ville Saalo

    The RSS feed has been in the app for quite a while already. Closing this one, please open new issues if there's anything wrong with the current implementation.

  8. Log in to comment
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.