FW: c#

瀏覽次數:0 次
跳到第一則未讀訊息

James Morley

未讀,
2015年3月25日 清晨6:45:242015/3/25
收件者:europe...@googlegroups.com
Hi all

I've had this question in to our a...@europeana.eu mailbox and we're not aware of any examples, but maybe someone on this list has used c# and the Europeana API?

If so, let me know and I'll pass it on.

Cheers, James


Sent: 24 March 2015 11:58
To: API Mailbox
Subject: c#

Hello,

I could not find any c# example of using the europeana Restful Api. Do you know if there are any examples some where in the web?

thank you


Enrico

James Morley

Creative Industries Community Developer

 

T:
M: +44 (0)77 1336 0563
E: James....@europeana.eu

Skype: jamesinealing

 

If you’re interested in Europe’s cultural heritage, sign up for our newsletter at http://eepurl.com/SAaC5 and start receiving our monthly eNews, in English or French!

 

Europeana makes Europe’s culture available for all, across borders and generations and for creative re-use – follow how at #AllezCulture 

 

Disclaimer: This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. If you are not the named addressee you should not disseminate, distribute or copy this email. Please notify the sender immediately by email if you have received this email by mistake and delete this email from your system.


Steven Moore

未讀,
2015年3月26日 清晨6:18:292015/3/26
收件者:europe...@googlegroups.com

IMO, it is best to use jQuery, d3.json or something like that within a C# page.  The example below uses the Europeana API within C# pages, but it is really Javascript that does all of the API work. 

https://github.com/smoore4moma/europeana-d3

Otherwise, follow these steps:

1) Get Newtonsoft.Json from NuGet then add it as a Reference
2) Add this to a C# web form:  using Newtonsoft.Json;

Then you can call the REST API in code-behind.  Here is a super simplistic example:


        protected void Page_Load(object sender, EventArgs e)
        {

            using (var webClient = new System.Net.WebClient())
            {
                // download json from url
                var json = webClient.DownloadString("http://europeana.eu/api/v2/search.json?query=foo&wskey=YOURKEY");
                // Now parse with JSON.Net
                Object m_data = JsonConvert.DeserializeObject<Object>(json);

                Literal1.Text = m_data.ToString();

James Morley

未讀,
2015年3月26日 上午8:50:252015/3/26
收件者:europe...@googlegroups.com
Hi Steven

That's really helpful - I'll pass it on.

Many thanks

James



From: europe...@googlegroups.com [europe...@googlegroups.com] on behalf of Steven Moore [steven...@moma.org]
Sent: 26 March 2015 11:18
To: europe...@googlegroups.com
Subject: {Europeana API forum} Re: FW: c#

--
You received this message because you are subscribed to the Google Groups "Europeana API forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to europeanaAPI...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

James Morley

Creative Industries Community Developer

 

T:
M: +44 (0)77 1336 0563
E: James....@europeana.eu

Skype: jamesinealing

 

Transform the world with culture. Find out how at our new and improved Europeana Pro: http://pro.europeana.eu

回覆所有人
回覆作者
轉寄
0 則新訊息