Linked api Integration - linkedin

Hi friends I am using LinkedIn API to integrate LinkedIn profile and messages to my website.
I got one sample example throgh googling. But the output is coming in XML output.
Then, how can I bind all those things to my website controls?

You should prefer java script API of linkedin
for more details visit Linkeidn javaScript api docs =>
Java Script API

You get XML output from LinkedIn such as XMLFile.xml.
Following example shows output in label.
DataSet tmpDs = new DataSet();
tmpDs.ReadXml(Server.MapPath("~/XMLFile.xml"));
lblUser.Text = tmpDs.Tables[0].Rows[0]["first-name"].ToString();

If you are using linkedin api urls, by default you get an XML response. You can add ?format=json at the end or the url to get response in json format instead of XML.
e.g.
http://api.linkedin.com/v1/people/~
will give XML result while
http://api.linkedin.com/v1/people/~?format=json
will give json result.
Hope it helps.

Related

How to include UPI payment URL inside Google QR Code generator URL?

I want to include "upi://pay?pa=8871459686#paytm&pn=Paytm%20Merchant&mc=abc&mode=02&orgid=000000&paytmqr=abcdefg&sign=abc+xyz/pqr/+stu"
this UPI payment link inside Google QR code generator link but when I am adding this link inside the URL ("https://chart.googleapis.com/chart?cht=qr&chs=315x315%26chl=") I am only getting "8871459686#paytm" after scanning QR code.
What I tried :
https://chart.googleapis.com/chart?cht=qr&chs=315x315%26chl=upi://pay?pa=8871459686#paytm&pn=Paytm%20Merchant&mc=abc&mode=02&orgid=000000&paytmqr=abcdefg&sign=abc+xyz/pqr/+stuchoe=UTF-8%26chld=L
Please can anyone tell me what will be the right way to add this "upi://pay?pa=8871459686#paytm&pn=Paytm%20Merchant&mc=abc&mode=02&orgid=000000&paytmqr=abcdefg&sign=abc+xyz/pqr/+stu" inside google QR code generator link.
Since Google api is using "get" method, you should encode your parameter ("upi://pay?pa=8871459686#paytm&pn=Paytm%20Merchant&mc=abc&mode=02&orgid=000000&paytmqr=abcdefg&sign=abc+xyz/pqr/+stu")
In JavaScript & PHP, you can urlencode() function to encode the parameters.
variable = urlencode(text)
Send URL encoded variable value in google API URL.

R output to confluence page REST API

I am new at using APIs. I have an R output in the form of a list which I want to paste on a confluence page. and I have no idea how. I have been trying to use Rest API but its confusing me.
I have been able to get a 200 response from the website using
httr::set_config(config(ssl_verifypeer=FALSE))
URL <- "http://xxx.xx.xx/xx/xx/daily_report"
response = GET(URL, authenticate("xxx", "xxx"))
response
Really clueless where to go next.
Try this:
content(response, "parsed", "application/json")$results

Why does the Google Analytics API method return less data than web ui

Do the Google Analytics API methods allow to get the same amount of data, that is accessible through the web UI?
The problem is, for example, that in browser I can see more that 3000 lines in a report, but the API method returs only several hundreds.
Here is a URL for API method that I use:
https://www.googleapis.com/analytics/v3/data/ga?ids=ga%3A73XXXXXX&dimensions=ga%3ApagePath%2Cga%3Akeyword&metrics=ga%3Avisits%2Cga%3AvisitBounceRate&sort=-ga%3Avisits&start-date=2015-09-01&end-date=2015-09-30&start-index=1&max-results=3000
The API method you are using has queries appended on it. (Everything after the '?' and seperated by the '&') These are not part of the URL but actually information that is used by the server to customize your result. By changing the URL to say: https://www.googleapis.com/analytics/v3/data/ga?ids=ga%3A73XXXXXX&dimensions=ga%3ApagePath%2Cga%3Akeyword&metrics=ga%3Avisits%2Cga%3AvisitBounceRate&sort=-ga%3Avisits&start-date=2015-09-01&end-date=2015-09-30&start-index=1&max-results=10000 , you should get more results in your response. You may also want to change the start and end date, just make sure to keep the YYYY-MM-DD format.

How to add parameters to SSRS URL in report viewer?

In reference to this article:
http://msdn.microsoft.com/en-us/library/ms252072(VS.80).aspx
I can access my SSRS report from my Web Application but the problem is it does not accept the parameters in the URL.
here is the format that it accepts
Report Server URL:
http://ABCD.com/reportserver
Report Path:
/Company works/Sales report/ABC
Can anyone help me?
I want to pass parameters in the SSRS url through report viewer.
You can not pass parameters via the URL since the control is expecting on the URL to the actual reportserver and nothing more.
Example:
serverReport.ReportServerUrl = new Uri("http://ABCS.com/reportserver");
serverReport.ReportPath = "/AdventureWorks Sample Reports/My Report";
You can pass these parameters in your code behind though by using the ReportViewer.ServerReport.SetParameters() function. Here is a snippet of code I used for this purpose:
var parametersCollection = new List<ReportParameter>();
//add generic parameters that every report needs
parametersCollection.Add(new ReportParameter("RandomizerString", new Random().Next().ToString(), false));
parametersCollection.Add(new ReportParameter("MachineName", Request.UserHostAddress.ToString(), false));
ERDashboard.ServerReport.SetParameters(parametersCollection);
can't seem to add a comment to Sam's answer so I'll post another:
The ReportViewerControl ReportServerURL property is a lot different than formatting a general URL to access a report. You could use the logic that sam has provided to navigate a web browser control to that URL which would also render the report within your web app. It's another to try if you want.
As a note there are various reasons that you may choose a webbrowser control vs a reportviewer control. The reportviewer control is a lot easier to manage in the code-behind, but there is a memory issue when refreshing a report for extended periods of time (lots of information through google about memory leaks). This is the scenario where I have instead used the webbrowser and manually formatted URLs to pass parameters instead.

Is it possible to use a search string url with Google Calendar

Would any body know if it is possible to search calendar events with a url string?
For example with gMail you could use:
https://mail.google.com/mail/?shva=1#search/Search+Term
to search for the words 'search' and 'term'
Any help or advice greatly appreciated.
Cheers
Noel
This is how you can search Google Calendar using a query parameter in the url:
https://www.google.com/calendar/render?q=TERM
where TERM is the string you're searching for.
So, you can search using a GET request.
Using Chrome's dev tools, it appears as though Google Calendar searches are performed using a POST request, so you won't be able to pass search terms into urls to fetch a response (which would be a GET request).
Update: Looks like a GET request will still return results, but the response is some form of JSON.
Here is the url (I x'd out my specific info), looks like its not meant for what you want to use it for:
https://www.google.com/calendar/search?ctz=America/New_York&hl=en&as_tp=basic&as_myuids=xxx&as_otheruids=xxx&as_q=kai%20mallea&as_cal=xxx;xxx&secid=xxx
A generalization of the current answer is:
https://calendar.google.com/calendar/b/0/render?q=TERM
where 0 is the index of the desired Google account (if you have multiple accounts).

Resources