Skip to content

Notifications#16

Merged
matejak merged 1 commit intoEnterpriseyIntranet:masterfrom
danil-topchiy:notifications
Jan 15, 2019
Merged

Notifications#16
matejak merged 1 commit intoEnterpriseyIntranet:masterfrom
danil-topchiy:notifications

Conversation

@danil-topchiy
Copy link

Add class to work with nextcloud notifications api
Nextcloud notifications api docs:
https://github.com/nextcloud/notifications/blob/master/docs/ocs-endpoint-v2.md

Based on #11, will rebase to master after #11 will be merged

def test_get_delete_notifications(self):
# get all notifications
res = self.nxc.get_notifications()
all_data = res['ocs']['data']
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is interesting, the test looks like that it may end up either way - there are or aren't any notifications. I would appreciate more control - what about deleting, asserting that there are none, and then adding and rediscovering them. Does it make sense?

Copy link
Author

@danil-topchiy danil-topchiy Jan 8, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, you right. As far as I researched, right now there is no possibility to create actions using api. It will be possible if we have WebDAV api implemented, which will let us make files related changes, writing comments, or Federated files sharing api, which also creates activity objects when sharing with another cloud. Also the same related to activites api (#15) tests.

Noticed it in code below as well:

        # TODO: add more tests if WebDAV api will be implemented and there will be ability to make actions
        #  using api which creates notifications (mentions in comments)
        #  or when Federated file sharings api will be implemented (harder way)

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great!

@matejak
Copy link

matejak commented Jan 7, 2019

This looks good so far, good work! However, I took a look at the notification-related commit, and it has no relationship to #11. Next time, you can make the PR based on master, it will be cleaner, and you don't have to worry about merge errors, there won't be any, or they will be trivial to resolve.

@matejak
Copy link

matejak commented Jan 14, 2019

Thank you for your pull request! Please rebase to resolve the conflict - there is no other merge blocker here.

@danil-topchiy
Copy link
Author

@matejak resolved and rebased

@scrutinizer-notifier
Copy link

The inspection completed: 1 new issues, 6 updated code elements

@matejak
Copy link

matejak commented Jan 15, 2019

Great, merging!

@matejak matejak merged commit e5d6746 into EnterpriseyIntranet:master Jan 15, 2019
@danil-topchiy danil-topchiy deleted the notifications branch June 15, 2019 16:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants