Code Monkey home page Code Monkey logo

cronofy-csharp's People

Contributors

abouassi-cc avatar adambird avatar adamwhittingham avatar andrewseward avatar cronofymatt avatar danieltallentire avatar grajo avatar gshutler avatar haziba avatar kr-mykyta avatar lavy-blaggan avatar nevett avatar scrambles56 avatar stephenbinns avatar yussufelarif avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

cronofy-csharp's Issues

return Event object or Id from UpsertEvent

When creating an event in an external calendar using UpsertEvent, it would bevery useful if the Event object that was modified or created was returned. Without it, I need to fetch the calendar events and attempt to match the returned list agianst the supplied values.

Issue with [Content_Types].xml in nuget package

While I'm on a roll with issues, just wanted to flag this one as well.

We use an internal nuget package repository that pipes through all packages on nuget.org

When I try to install the Cronofy package via our repository it fails (if I go via nuget.org it works ok). But I can't install any other packages because the Cronofy package was constantly blocking it (I would remove it from packages.config - do my updates, and then add it back in).

When it came time to package up the library that had the Cronofy package, it failed with the error

"'Default' tag requires a nonempty 'Extension' attribute. Position 1, Line 506

Google wasn't much help, apart from this random github issue : oxyplot/oxyplot#184

So I downloaded the nuget package and went searching and found the issue in the above file:

<?xml version="1.0"?>
<Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types">
  <Default ContentType="application/vnd.openxmlformats-package.relationships+xml" Extension="rels"/>
  <Default ContentType="application/octet" Extension="nuspec"/>
  <Default ContentType="application/octet" Extension="dll"/>
  <Default ContentType="application/octet" Extension="xml"/>
  <Default ContentType="application/octet" Extension="config"/>
  <Default ContentType="application/octet" Extension="csproj"/>
  <Default ContentType="application/octet" Extension="cs"/>
  <Default ContentType="application/octet" Extension=""/> <!-- Problem line -->
  <Default ContentType="application/octet" Extension="md"/>
  <Default ContentType="application/vnd.openxmlformats-package.core-properties+xml" Extension="psmdcp"/>
</Types>

Removing the offending line, and pushing it to our repository solved the problem completely.
Not 100% sure what would causing the issue, but did want to flag it.

Thanks heaps
Richard Young
Senior Software Engineer
JobAdder

Async methods

Hello,

Please consider adding async versions for api methods.
Thanks

OAuthTokenResponse.ToToken fails on an invalid request

Hi there,

Have started using the API - and have a small blocker with the CronofyOAuthClient.GetTokenFromCode request. Have been trying to create a token from my code, and keep getting an NullReferenceException in the above call.

After a bit of researching, I discovered the scope string was null and trying to convert it to the array was what was causing the Exception.

After struggling through trying to get a look on the what I was sending and receiving back from the request, I discovered I was getting a 400 bad request.

Anyway looking further, the ConcreteHttpClient gets the response (function line 138) - and happily processes it, and then the JSON deserialization happens and happily deserializes the response to an OAuthTokenResponse object, despite not containing any of the correct data.

So when ToToken() is called, none of the data is there and it causes a null reference exception.

Let me know if you require anymore information - it's 10:30PM here in Aus so I may not be completely fluent in my point :D

Thanks heaps
Richard Young
Senior Software Engineer
JobAdder

No locale or templating support

No locale or templating support although API endpoints has it even if it is alpha version it should be at least on development branches

No way to specify some Availability API request parameters using builder

I was going about using this library to form and send requests to the Availability API using

public IEnumerable<AvailablePeriod> GetAvailability(AvailabilityRequest availabilityRequest)

I noticed however that there are some missing request parameters that the Availability API does accept in actual requests including:

  • response_format
  • max_results

I would like to see these added to the library. I can add them myself and put up a PR if that route makes sense. Thanks!

Timezone ignored when using specific Start/End overload on UpsertEventRequestBuilder

var cronofy = new CronofyAccountClient("xxxxxxxxxx");
string calendarId = "yyyyyyyyyyyyy";

var eventBuilder1 = new UpsertEventRequestBuilder()
    .EventId(Guid.NewGuid().ToString())
    .Summary("Cancun 17-18 | " + DateTime.Now.ToLongTimeString())
    .Description("Event description")
    .Start(2019, 11, 04, 17, 00)
    .End(2019, 11, 04, 18, 00)
    .TimeZoneId("America/Cancun");

var eventBuilder2 = new UpsertEventRequestBuilder()
    .EventId(Guid.NewGuid().ToString())
    .Summary("Malta 17-18 | " + DateTime.Now.ToLongTimeString())
    .Description("Event description")
    .Start(2019, 11, 04, 17, 00)
    .End(2019, 11, 04, 18, 00)
    .TimeZoneId("Europe/Malta");

cronofy.UpsertEvent(calendarId, eventBuilder1);
cronofy.UpsertEvent(calendarId, eventBuilder2);

I would expect this to create appointments at the specified time in the specified timezones - but it seems anything you enter in this overload of start/end is interpreted as UTC time, because this is how they show up in my calendar:

image

Using DateTime for start and end does not have the same issue.

.Net Standard

Hello,

Please consider adding the support of .net standard. It looks like there are no any dependencies which will don't support .net standard and the code should work as well (at least on a first look).

Please note that you can have multiple build targets in nuget package if you would like to keep .net 3.5.
Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.