is there a url for opening roundcube calendar the day of a given event? - roundcube

I wrote a web apps that create a kolab Event et put it in calendar.
now, i wish to create link in my apps that will go to the identified event directly in roundcube.
since in Know the day, it could be possible to give a date instead of the ID of the event.
anyone know of such feature in Roundcube ?

with some luck, I found my Answer by navigating in the calendar. if a go to the «next week», the url change in we got a beautiful
https://kolab.mydomaine.fr/roundcubemail/?_task=calendar&view=agendaWeek&date=1392678000
with date = the timestamp of the day I wish to show.
so, with a little python (using django)
def get_absolute_url(self):
timestamp = int(time.mktime(self.event.get_start().timetuple()))
return "https://{kolab_domaine}/roundcubemail/?_task=calendar&view=agendaWeekdate={timestamp}".format(kolab_domaine=self.get_kolab_domain(), timestamp=timestamp)

Related

Spotify API - Detect a change on Active player

I'm playing with the Spotify API in a new component on my VueJS playground, and right now I'm able to control the main application from my web app (just see the current track info, be able to play, pause, skip to next song and to the prevoious one).
The thing is that to display the current information of the current song, I'm doing requests to the playback state endpoint (/me/player) to get all the info. I'm doing it every second unless when the user does an action (play, pause, next...), in that case I force a call to get the current state with all the info.
I think that something like a subscription or an event to detect changes on the player would be so much optimum.
I didn't find something like that on the API Reference. Anyone did a workaround for this?
If you want to see the code of the component, It's available on my GitHub.
Thank you in advance :)
p.s: I'm not used to ask in StackOverflow yet so sorry if I'm missing something.

Identical feature on two devices but different behaviors/scenarios for BDD testing

The feature : As a user, I want to be able to change the anniversary of a panda
We have two versions of our app : Desktop / Mobile
On desktop we have to go to the detail page of a panda -> we click to the change anniversary date button -> pop up where we can enter the new date, we validate and it's done. It gives this scenario :
Given the user is in the detail page of a panda
and the user is logged
When the user update the anniversary date of the panda
Then the anniversary date is updated
On mobile we have to select the menu change anniversary date -> new page where we enter a panda name -> we are send to a new page where we enter the new anniversary date. We validate and it's done. It gives this scenario :
Given the user is in the Change Anniversary mode
And a panda is selected
And the user is logged
When the user update the anniversary date
Then the anniversary date is updated.
If I found easy to write scenarios for the desktop, for the mobile I'm blocked on the possible scenario to select a non existing panda. This behavior can't exist on the desktop since we have a list of panda and we have to click on one to go to the detail page. Instead of that, on mobile we have to enter the name of a panda so it's possible we enter a non existent name. I have for the moment this scenario but I don't like it :
Given the user is in the Change Anniversary mode
And the user is logged
When the user enter a non existing panda name
Then an error message is shown
&
Given the user is in the Change Anniversary mode
And the user is logged
When the user enter an existing panda name
Then the panda is selected
And I'm blocked because the new feature offered is identical on both device. Do I need to make my behaviors/scenarios match between Desktop and Mobile or is it okay that my behaviors/scenarios are a different based on the platform ? If I choose the second option How do I precise the platform : on the title scenario or in the Given ? What about all others scenarios I already written ? I hope someone already find a solution for this problem :p
Thank you for your help !
EDIT : I added the title feature and some scenarios I have for the moment :)
Your examples are not very clear, you say On desktop we have to go to the detail page of a panda -> we click to the change anniversary date button -> pop up where we can enter the new date, we validate and it's done. It gives this scenario but in the scenario you mention that the user is logged and i don't see where this happens, before needing to select a panda or after.
Just from what I could understand, you have 2 options:
have different scenarios for mobile and desktop, you can annotate with a platform tag e.g. #mobile and based on this tab to open the specific platform, or just create different suites, one for mobile(if you have native application) and one for desktop
don't add specific platform details and handle the details in the implementation
Given I am logged in
When I change the anniversary date for a panda
Then the anniversary date is changed
What I recommend: If there are just few differences you can use the second option, but it you have a lot of them then maybe it's better to have different scenarios for mobile and desktop, also if you have native app then I would say to execute them in different suites
Since my behaviors are different and my users are different for the mobile and desktop app I decided to separate my scenario and like lauda said, it gives me the ability to use a different solution to test if it was a native mobile app (not in my case now but for others ^^).
In my project, mobile and desktop scenarios are separate in different files :
../features/anniversary_panda/desktop/
Background: Login
Given the user is logged in as a panda manager
Scenario: Change anniversary date for a panda
Given the user is in the detail page of a panda
When the user update the anniversary date of the panda
Then the anniversary date is updated
../features/anniversary_panda/mobile/
Background: Login
Given the user is logged in as a veterinary
Scenario: Change anniversary date for a panda
Given the user is in the Change Anniversary mode
And a new date is already entered
When the user enter an existing panda name
Then the anniversary date is updated
Thanks for your help, just explaining my case to you helps me a lot :)

OK.RU embed videos set start time and hide controls

I want to embed a video from Ok.ru and then specify the time on which the video should start (eg: the video should start from second 5), and to hide the controls, like on YouTube's embed API.
I just found their API, but I am unable to find how to do the above.
Ok.ru API is viewable here: English Documentation
How to do this? Thank you!
My two cents:
You can specify the start time by appending
?fromTime=...
to the URL, e.g.,
https://ok.ru/live/2001158479822?fromTime=38

Xcode: Calendar for Ipad or Iphone

I have a technical question: In xcode there is only a data-picker and this element is not functional in my app because in my app the user must be fast to choose date time. I would to use another instrument for chose a date. Have you any suggestions?
You can probably use one of the Date pickers lots of web sites are using : some kind of calendar view where you touch at the day you want.
You may have to code your own component though.
Examples :
http://www.bitrepository.com/a-collection-of-free-javascript-date-pickers.html

Setting end date for repeating local notification in iPhone OS4 SDK

In the iPhone OS4 SDK, does anyone have a suggestion for how I would implement a repeating local notification that ends on a particular date?
Looking at the API documentation, there doesn't appear to be a built-in property of UILocalNotification to allow you to set an end date on a repeat.
Any suggestions would be much appreciated.
Thank you!
Two ways that you could go about it:
Track the end date in your app. Whenever the app launches, check for notifications which are now "expired" and call cancelLocalNotification on them.
Alternatively, instead of using the repeatInterval property of the notification, manually schedule the x number of repeat notifications.
Set notification for each repeat date and check programatically that repeat date is not greater than end date by NSDateComparator.