How does RingCentral localization L10N support work? - localization

In the RingCentral user extension info API, there is a regionalSettings component with three different properties for locale: language, greetingLanguage and formattingLocale. What differentiates these 3 properties and how would you use them when localizing an app?
Here is an example response excerpt:
"regionalSettings": {
"timezone": {
"uri": "https://platform.devtest.ringcentral.com/restapi/v1.0/dictionary/timezone/58",
"id": "58",
"name": "US/Pacific",
"description": "Pacific Time (US & Canada)",
"bias": "-480"
},
"homeCountry": {
"uri": "https://platform.devtest.ringcentral.com/restapi/v1.0/dictionary/country/1",
"id": "1",
"name": "United States",
"isoCode": "US",
"callingCode": "1"
},
"language": {
"id": "1033",
"name": "English (United States)",
"localeCode": "en-US"
},
"greetingLanguage": {
"id": "1033",
"name": "English (United States)",
"localeCode": "en-US"
},
"formattingLocale": {
"id": "1033",
"name": "English (United States)",
"localeCode": "en-US"
},
"timeFormat": "12h"
},

The API Reference describes the following:
language: User interface language data
greetingLanguage: Information on language used for telephony greetings
formattingLocale: Formatting language preferences for numbers, dates and currencies
Ref: https://developer.ringcentral.com/api-docs/latest/index.html#!#RegionalSettings

Related

Graph API calendar endpoint doesn't support sending Adaptive card as attachment

We are using https://graph.microsoft.com/v1.0/me/calendar/events for creating Calendar events. What we are trying to achieve additionally is to send an adaptive card as attachment. We are using below code as POST body
{
"subject": null,
"body": {
"contentType": "html",
"content": "<attachment id=\"74d20c7f34aa4a7fb74e2b30004247c5\"></attachment>"
},
"attachments": [
{
"id": "74d20c7f34aa4a7fb74e2b30004247c5",
"contentType": "application/vnd.microsoft.card.adaptive",
"contentUrl": null,
"content": "{\"$schema\":\"http://adaptivecards.io/schemas/adaptive-card.json\",\"version\":\"1.5\",\"type\":\"AdaptiveCard\",\"body\":[{\"type\":\"Container\",\"style\":\"emphasis\",\"items\":[{\"type\":\"TextBlock\",\"text\":\"TheEYorganizationtodayannouncesthedetailsofthe52womenfounders\",\"wrap\":true},{\"type\":\"ColumnSet\",\"columns\":[{\"style\":\"default\",\"width\":\"stretch\",\"items\":[{\"type\":\"ColumnSet\",\"columns\":[{\"items\":[{\"type\":\"Image\",\"width\":\"200px\",\"url\":\"https://tse3.mm.bing.net/th/id/OIP._awI5wQIVTy1k8QdHtpSWQHaEK?w=292&h=180&c=7&r=0&o=5&dpr=1.3&pid=1.7\"}],\"type\":\"Column\",\"width\":\"auto\"},{\"items\":[{\"type\":\"TextBlock\",\"size\":\"Medium\",\"weight\":\"Bolder\",\"text\":\"SomeText\",\"wrap\":true},{\"type\":\"TextBlock\",\"size\":\"Medium\",\"weight\":\"Bolder\",\"text\":\"[https://adaptivecards.io](https://adaptivecards.io)\",\"wrap\":true}],\"type\":\"Column\",\"width\":\"auto\"}]}],\"minHeight\":\"100px\",\"type\":\"Column\"}]}]}]}",
"name": null,
"thumbnailUrl": null
}
],
"start": {
"dateTime": "2022-11-18T12:00:00",
"timeZone": "Pacific Standard Time"
},
"end": {
"dateTime": "2022-11-18T12:30:00",
"timeZone": "Pacific Standard Time"
},
"location": {
"displayName": "Harry's Bar"
},
"attendees": [
{
"emailAddress": {
"address": "xero.01234#contoso.com",
"name": "Orex"
},
"type": "required"
}
],
"isOnlineMeeting": true,
"onlineMeetingProvider": "teamsForBusiness"}
Using above body, I am getting below error
{
"error": {
"code": "UnableToDeserializePostBody",
"message": "were unable to deserialize "
}}
As I understand this has something to do with the JSON I am passing as content inside attachment, I want to know if calendar invites endpoint supports adaptive card or not or is there any way, we can send adaptive card (using .NET SDK) to mail or events in outlook
Thanks, in advance
You can send actionable messages via emails only, see Supported scenarios for more information.

How to Create a 3 level graph using NEO4J using JSON Array of Objects

I want to create a graph using neo4j which gives me a graph of the terms in the "JavaScript" array of the following JSON data, along with relationships pointing to unique "relatedTerms" nodes.
Here is my JSON data:
{
"JavaScript": [
{
"termName": "asm.js",
"link": "/terms/javascript/asmjs",
"info": "A subset of JavaScript. Effectively describes a safe virtual machine for memory-unsafe languages like C or C++. It can be used as a low-level, efficient target language for compilers.",
"relatedTerms": [
{
"name": "JavaScript",
"link": "/terms/go_to_term/549"
},
{
"name": "C",
"link": "/terms/go_to_term/470"
},
{
"name": "C++",
"link": "/terms/go_to_term/860"
},
{
"name": "compilers",
"link": "/terms/go_to_term/390"
}
],
"category": "JavaScript"
},
{
"termName": "Cycle.js",
"link": "/terms/javascript/cyclejs",
"info": "JavaScript framework for a predictable code. Builds on functional and reactive streams. Describes an app as a simple function taking an event stream as input and outputting an event stream.",
"relatedTerms": [
{
"name": "JavaScript",
"link": "/terms/go_to_term/549"
}
],
"category": "JavaScript"
},
{
"termName": "Derby",
"link": "/terms/javascript/derby",
"info": "Server component which is written on top of Node.js. It's is a server-side application with rich real-time data synchronization technology such used in google docs.",
"relatedTerms": [
{
"name": "Node.js",
"link": "/terms/go_to_term/595"
}
],
"category": "JavaScript"
},
{
"termName": "Express.js",
"link": "/terms/javascript/expressjs",
"info": "Lightweight, efficient middleware and routing framework. Express.js is best known as another quarter of the MEAN (MongoDB, Express, AngularJS and Node) software stack, and is the most popular Node.js framework.",
"relatedTerms": [
{
"name": "MEAN",
"link": "/terms/go_to_term/361"
},
{
"name": "MongoDB",
"link": "/terms/go_to_term/868"
},
{
"name": "AngularJS",
"link": "/terms/go_to_term/47"
},
{
"name": "Node",
"link": "/terms/go_to_term/595"
}
],
"category": "JavaScript"
},
{
"termName": "Flow",
"link": "/terms/javascript/flow",
"info": "A static type checker for JavaScript. Integrates with the code editor by checking changes and analyzing correctness of the code. Provides context as to what is wrong with the code.",
"relatedTerms": [
{
"name": "JavaScript",
"link": "/terms/go_to_term/549"
}
],
"category": "JavaScript"
},
{
"termName": "Hapi",
"link": "/terms/javascript/hapi",
"info": "Web framework for building web applications, APIs and services. Hapi was created around the idea that configuration is better than code, that business logic must be isolated from the transport layer.",
"relatedTerms": [
{
"name": "APIs",
"link": "/terms/go_to_term/206"
}
],
"category": "JavaScript"
},
{
"termName": "Koa",
"link": "/terms/javascript/koa",
"info": "Callback-less, lightweight middleware framework for Node.js to build efficient web applications and APIs. Koa.js efficiently uses generators to deal with callbacks and increase error-handling capabilities.",
"relatedTerms": [
{
"name": "Node.js",
"link": "/terms/go_to_term/595"
},
{
"name": "API",
"link": "/terms/go_to_term/206"
}
],
"category": "JavaScript"
},
{
"termName": "MEAN",
"link": "/terms/javascript/mean",
"info": "A full stack JavaScript solution that refers to the first letters of the four components of a solution for building dynamic websites: MongoDB, a NoSQL database; Express.js, a web applications framework; Angular.js, a JavaScript MVC framework for web apps; Node.js, a software platform for scalable server-side and networking applications.",
"relatedTerms": [
{
"name": "JavaScript",
"link": "/terms/go_to_term/549"
},
{
"name": "MongoDB",
"link": "/terms/go_to_term/868"
},
{
"name": "NoSQL",
"link": "/terms/go_to_term/951"
},
{
"name": "Express.js",
"link": "/terms/go_to_term/392"
},
{
"name": "Angular.js",
"link": "/terms/go_to_term/47"
},
{
"name": "MVC",
"link": "/terms/go_to_term/201"
},
{
"name": "Node.js",
"link": "/terms/go_to_term/595"
}
],
"category": "JavaScript"
},
{
"termName": "Meteor",
"link": "/terms/javascript/meteor",
"info": "JavaScript framework built on top of Node.js with MongoDB as its database driver. With Node.js and Meteor, you’re using JavaScript everywhere, and data is synced through the use of WebSockets, a protocol that allows an interactive communication between server and browser.",
"relatedTerms": [
{
"name": "Node.js",
"link": "/terms/go_to_term/595"
},
{
"name": "MongoDB",
"link": "/terms/go_to_term/868"
},
{
"name": "JavaScript",
"link": "/terms/go_to_term/549"
},
{
"name": "WebSockets",
"link": "/terms/go_to_term/1046"
}
],
"category": "JavaScript"
},
{
"termName": "Node.js",
"link": "/terms/javascript/nodejs",
"info": "One of the most popular JavaScript frameworks which eases the work of building web applications. By far the fastest growing language in use. Runs on Windows, Linux, and Mac OS. The use of Node.js is mainly for full stack, front-end and back-end.",
"relatedTerms": [
{
"name": "JavaScript",
"link": "/terms/go_to_term/549"
},
{
"name": "Windows",
"link": "/terms/go_to_term/1373"
},
{
"name": "Linux",
"link": "/terms/go_to_term/558"
},
{
"name": "Node.js",
"link": "/terms/go_to_term/595"
}
],
"category": "JavaScript"
},
{
"termName": "Oracle JET",
"link": "/terms/javascript/oracle_jet",
"info": "Oracle JavaScript Extension Toolkit. A modular toolkit based on modern JavaScript, CSS3 and HTML5 design and development principles. Created for developers who work on applications that consume and interact with Oracle products and services.",
"relatedTerms": [
],
"category": "JavaScript"
},
{
"termName": "Restify",
"link": "/terms/javascript/restify",
"info": "A Node.js module built specifically to enable to build correct REST web services. It borrows heavily from express as that is more or less the de facto API for writing web applications on top of Node.js.",
"relatedTerms": [
{
"name": "Node.js",
"link": "/terms/go_to_term/595"
},
{
"name": "REST",
"link": "/terms/go_to_term/524"
},
{
"name": "API",
"link": "/terms/go_to_term/206"
}
],
"category": "JavaScript"
},
{
"termName": "Sails",
"link": "/terms/javascript/sails",
"info": "Sails.js wraps express and provides another higher level for doing things like connecting to the DB, auto-generating input pages, etc. Especially suitable for creating chat apps or multiplayer games.",
"relatedTerms": [
{
"name": "DB",
"link": "/terms/go_to_term/415"
}
],
"category": "JavaScript"
},
{
"termName": "Seneca",
"link": "/terms/javascript/seneca",
"info": "Microservices toolkit for Node.js. Helps to write an organized code that can be scaled and deployed at any time. Organizes the business logic of an app.",
"relatedTerms": [
{
"name": "Node.js",
"link": "/terms/go_to_term/595"
}
],
"category": "JavaScript"
}
]
}
My Expected Result looks like:
The following is my Query:
CALL apoc.load.json("file:///js.json") YIELD value
UNWIND value.JavaScript AS item
FOREACH(js IN item |
CREATE(cat:Category{name:js.termName})
FOREACH(rt in item.relatedTerms|
CREATE(rtt:RelatedTerms{name:rt.name})
MERGE (cat)-[r:RELATESTO]->(rtt)))
And here is my Actual Result:
Try switching the CREATE statements for MERGE statements. In Cypher, MERGE will check to see if a pattern exists and create it if it does not. CREATE will create a new pattern every time, even if a pattern like it already exists in the graph.
CALL apoc.load.json("file:///js.json") YIELD value
UNWIND value.JavaScript AS item
MERGE (cat:Category {name:item.termName})
WITH cat, item
UNWIND item.relatedTerms AS subitem
MERGE (rt:RelatedTerm {name:subitem.name})
MERGE (cat)-[:RELATES_TO]->(rt)
RETURN *

Timezones in Google Mail Markup

We recently implemented the Rental car Mail Markup. For this we implemented the pickup and dropoff time as ISO dates as shown in the documentation. Nevertheless it appeared to us that the timezones of our dates has been ignored and thus we removed the timezone and add the date in local time of the pickup destination. Now we still get reports that in some occasions our date is interpreted as being UTC+0 and then displayed with a wrong time. What is the right way to put in the date so that it will be correctly displayed in google mail?
Thanks in advance
Our Mail includes this snippet
{
"#context": "http://schema.org",
"#type": "RentalCarReservation",
"reservationNumber": "K0523X3368",
"reservationStatus": "http://schema.org/Pending",
"url": "...",
"underName": {
"#type": "Person",
"name": "....",
"email": "..."
},
"programMembership": {
"#type": "ProgramMembership",
"memberNumber": ...,
"program": "..."
},
"bookingAgent": {
"#type": "Organization",
"name": "...",
"url": "..."
},
"reservationFor": {
"#type": "RentalCar",
"name": "FIAT PANDA",
"model": "MBMR",
"brand": {
"#type": "Brand",
"name": "FIAT PANDA"
},
"description": "FIAT PANDA",
"rentalCompany": {
"#type": "Organization",
"name": "Hiper Rentacar"
}
},
"pickupLocation": {
"#type": "Place",
"name": "Palma de Mallorca Airport",
"address": {
"#type": "PostalAddress",
"streetAddress": "Palma de Mallorca Airport",
"addressLocality": "Palma",
"postalCode": "07611",
"addressRegion": "ES",
"addressCountry": "ES"
}
},
"pickupTime": "2019-02-13T14:00:00.000+00:00",
"dropoffLocation": {
"#type": "Place",
"name": "Palma de Mallorca Airport",
"address": {
"#type": "PostalAddress",
"streetAddress": "Palma de Mallorca Airport",
"addressLocality": "Palma",
"postalCode": "07611",
"addressRegion": "ES",
"addressCountry": "ES"
}
},
"dropoffTime": "2019-02-14T08:00:00.000+00:00",
"cancelReservationUrl": "...",
"modifyReservationUrl": "...",
"potentialAction": [
{
"#type": "EditAction",
"target": "..."
}
],
"price": 16.91,
"priceCurrency": "EUR",
"modifiedTime": "2018-05-23T09:20:32.861Z"
}
the resulting card looks like that
mail card
All dates are shown in UTC although my machine is currently located in Germany and the rentlocation is in Spain (both CEST)

Microsoft graph findmeetingtimes with meetingTimeSlot

I pretty confuse about meetingTimeSlot attribute which returns from meetingTimeSuggestions
My activityDomain set to "work" but my response code after I post to the API is
{ start:
{ dateTime: '2017-08-17T23:00:00.0000000',
timeZone: 'SE Asia Standard Time' },
end:
{ dateTime: '2017-08-18T01:00:00.0000000',
timeZone: 'SE Asia Standard Time' } }
time length should around 8.00 am - 5.00 pm isn't it?
Here is my full code
{
"attendees": [{
"type": "required", // First Attendee
"emailAddress": {
"name": "Pathompong Chaisri",
"address": "T00400#g-able.com"
}
}, {
"type": "required", // Third Attendee
"emailAddress": {
"name": "Artima C",
"address": "Artima.C#g-able.com"
}
}],
"locationConstraint": {
"isRequired": "false",
"suggestLocation": "false",
"locations": [{
"resolveAvailability": "false",
"displayName": "KX Building Floor 13"
}]
},
"timeConstraint": {
"activityDomain": "work",
"timeslots": [{
"start": {
"dateTime": "2017-08-17T09:00:00",
"timeZone": "SE Asia Standard Time"
},
"end": {
"dateTime": "2017-08-19T17:00:00",
"timeZone": "SE Asia Standard Time"
}
}]
},
"meetingDuration": "PT2H",
"returnSuggestionReasons": "true",
"minimumAttendeePercentage": "100"
}
Isn't that because your timeslot starts 17-08-2017 and ends two days later? I think you should provide separate 9-5 slots for each day.

twitter oauth php

I am implementing a log-in system for my application based on twitter oAuth and I would like to get the email address and other basic info of tech user, is it possible to get it?
Yes it is possible to get basic info of user,Here is the list of all operations you can perform using twitter Rest API.
https://dev.twitter.com/docs/api/1.1
GET account/settings
Returns settings (including current trend, geo and sleep time information) for the authenticating user.
I cant find the email of logged user, but you can see other information.
Example:
{
"always_use_https": true,
"discoverable_by_email": true,
"geo_enabled": true,
"language": "en",
"protected": false,
"screen_name": "theSeanCook",
"show_all_inline_media": false,
"sleep_time": {
"enabled": false,
"end_time": null,
"start_time": null
},
"time_zone": {
"name": "Pacific Time (US & Canada)",
"tzinfo_name": "America/Los_Angeles",
"utc_offset": -28800
},
"trend_location": [
{
"country": "United States",
"countryCode": "US",
"name": "Atlanta",
"parentid": 23424977,
"placeType": {
"code": 7,
"name": "Town"
},
"url": "http://where.yahooapis.com/v1/place/2357024",
"woeid": 2357024
}
],
"use_cookie_personalization": true
}

Resources