Search Results

Search found 12239 results on 490 pages for 'bing api'.

Page 10/490 | < Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >

  • Using Gdata Calendar API for PHP App to create a calender system with event ownership

    - by linuxlover101
    Hello, I'm working on a PHP app, and I'm trying to find the best way to set up a calendar system. First let me describe the intended function of the system: The application has multiple users who can login simultaneously. Each user should be able to add their own events and display them on their "profile." Also, on another page, the events should be able to be shown all together (from all users) and from each individual users exclusively. Since Google Calendar has a nice calendar-looking interface, I thought I would work with the GData APIs. Originally, I thought this would make things easier. But then it seems that if I want to represent event ownership, either each user would have to have a google account or somehow they all would each have to have a separate calendar. Thus, the application would have to create the calendar (if it does not exist) and be able to edit only their calendar. Two questions: Can I somehow use the GData APIs to accomplish my goal? (Mainly event ownership.) Should I just create my own calendar like application? Thanks!

    Read the article

  • youtube python api gdata.service. requesterror

    - by nashr rafeeg
    i have the following code which is trying to add a set of videos into a youtube play list import urllib,re import gdata.youtube import gdata.youtube.service class reddit(): def __init__(self, rssurl ='http://www.reddit.com/r/chillmusic.rss' ): self.URL = rssurl self._downloadrss() def _downloadrss(self): if self.URL.endswith('.rss'): # Downloadd the RSS feed of the subreddit - save as "feed.rss" try: print "Downloading rss from reddit..." urllib.urlretrieve (URL, "feed.rss") except Exception as e: print e def clean(self): playList = open("feed.rss").read() links = re.findall(r'(http?://www.youtube.com\S+)', playList) for link in links: firstPass = link.replace('&quot;&gt;[link]&lt;/a&gt;', '') secondPass = firstPass.replace('&amp;amp;fmt=18', '') thirdpass = secondPass.replace('&amp;amp;feature=related', '') finalPass = thirdpass.replace('http://www.youtube.com/watch?v=', '') print thirdpass, "\t Extracted: ", finalPass return finalPass class google(): def __init__(self, username, password): self.Username = username self.password = password #do not change any of the following self.key = 'AI39si5DDjGYhG_1W-8n_amjgEjbOU27sa0aw2RQI5gOaoK5KqCD2Fzffbkh8oqGu7CqFQLLQ7N7wK0gz7lrTQbd70srC72Niw' self.appname = 'Reddit playlist maker' self.service = gdata.youtube.service.YouTubeService() def authenticate(self): self.service.email = self.Username self.service.password = self.password self.service.developer_key = self.key self.service.client_id = self.appname self.service.source = self.appname self.service.ssl = False self.service.ProgrammaticLogin() def get_playlists(self): y_playlist = self.service.GetYouTubePlaylistFeed(username='default') l = [] k = [] for p in y_playlist.entry: k=[] k=[p.link[1].href, p.title.text] l.append(k) return l def get_playlist_id_from_url(self, href): #quick and dirty method to get the playList id's return href.replace('http://www.youtube.com/view_play_list?p=','') def creat_playlist(self, name="Reddit list", disc ="videos from reddit"): playlistentry = self.service.AddPlaylist(name, disc) if isinstance(playlistentry, gdata.youtube.YouTubePlaylistEntry): print 'New playlist added' return playlistentry.link[1].href def add_video_to_playlist(self,playlist_uri,video): video_entry = self.service.AddPlaylistVideoEntryToPlaylist( playlist_uri, video) if isinstance(video_entry, gdata.youtube.YouTubePlaylistVideoEntry): print 'Video added' URL = "http://www.reddit.com/r/chillmusic.rss" r = reddit(URL) g = google('[email protected]', 'xxxx') g.authenticate() def search_playlist(playlist="Reddit list3"): pl_id = None for pl in g.get_playlists(): if pl[1] == playlist: pl_id = pl[0] print pl_id break if pl_id == None: pl_id = g.creat_playlist(name=playlist) return pl_id pls = search_playlist() for video_id in r.clean(): g.add_video_to_playlist(pls, video_id) when i run the code i am geting the following error message gdata.service.RequestError: {'status': 303, 'body': '', 'reason': 'See Other'} any one have any idea why i am getting this error cheers Nash

    Read the article

  • google maps api v2 - tens of thousands of markers

    - by Adam
    Hello, my problem is with XXk (aka XX000) markers, atm I have 7k markers and will be more, and more, problem is in marker database, because atm this is 4MB (link to my DB http://tinyurl.com/ybau9ce) and problem is, how load that fast? for example DOWNLOAD only this what are show now, DOWNLOAD because load I have with ClusterMarker and problem is not with java but with download that database I think...

    Read the article

  • gdata youtube api 302 'The document has moved'

    - by zalew
    I'm trying to get YouTube feeds with the python gdata library. Authentication features work ok, yt_service.ProgrammaticLogin() works, generating subauth token works, etc., but when I try to get some feeds (GetMostRecentVideoFeed, GetYouTubeVideoEntry, even GetFeed, and any other) I get: RequestError: {'status': 302, 'body': '<HTML><HEAD><meta http-equiv="content-type" content="text/html;charset=utf-8">\n<TITLE>302 Moved</TITLE></HEAD><BODY>\n<H1>302 Moved</H1>\nThe document has moved\n<A HREF="http://www.google.com">here</A>.\r\n</BODY></HTML>\r\n', 'reason': 'Redirect received, but redirects_remaining <= 0'} 302 to 'google.com'??? I've even tried to do something from the google online tutorials and I get the same error. What's going on?

    Read the article

  • Google Maps iPhone API Terrain View

    - by Adam
    We're using MapKit on an iPhone app to display a Google Map with terrain view. However, the terrain view only shows when the user has an active Internet connection, the moment the user's Internet is off, the terrain on the map disappears and it appears flat. Is there any way to keep the terrain view on even when the user isn't on an active internet connection? Thanks! Adam

    Read the article

  • Google Place API marker issue

    - by user2959740
    I am creating itinerary planner like http://www.plnnr.com I want to create Google Place marker by direction(North,East,west,south) for e.g. When people select 4 day it should show attraction for 1st day all north location 2nd day east location then south and west. How to i do the auto marker. I am not sure how plnnr.com works how they are generating the lines based on direction. Please anyone help me on this.

    Read the article

  • Google Maps API v3 - Directions/Paths breaking KML Overlay Infowindows

    - by Douglas
    I'm in the end stages before content filling and then production on the Google Maps project I've been working on. A number of bugs and such have been thwarted, but this latest one has me relatively stumped. The demo map can be viewed here: http://dougglover.com/samples/finalProduct/ Everything works fine until you create a path using the Directions section(not to be confused with Get Directions). To reproduce the problem, play around with the map, click on a building or two, just to see the functionality. After ensuring that clicking on a building works(brings up an infowindow), choose two buildings to get directions to in the Directions area. It works great with the routing algorithm I've implemented, and the paths show up nicely, and intelligently. The problem being that you can't click buildings anymore to see their info. I'm assuming it has something to do with the z-index error popping up in the console, but I'm not sure how to handle that if it is the problem. Any guidance is greatly appreciated. :)

    Read the article

  • Setting a min/max zoom for Bing maps in Silverlight

    - by Boone
    I am using the Silverlight sdk for Bing Maps. I have my map, I have my PushPins all mapped out. Now I want to disable the user from zooming out so far they see the whole world and keep it constricted to the just the US. It would be nice if there was something simple like Map.MaxZoom but there is not. Any help?

    Read the article

  • Faster, Simpler access to Azure Tables with Enzo Azure API

    - by Herve Roggero
    After developing the latest version of Enzo Cloud Backup I took the time to create an API that would simplify access to Azure Tables (the Enzo Azure API). At first, my goal was to make the code simpler compared to the Microsoft Azure SDK. But as it turns out it is also a little faster; and when using the specialized methods (the fetch strategies) it is much faster out of the box than the Microsoft SDK, unless you start creating complex parallel and resilient routines yourself. Last but not least, I decided to add a few extension methods that I think you will find attractive, such as the ability to transform a list of entities into a DataTable. So let’s review each area in more details. Simpler Code My first objective was to make the API much easier to use than the Azure SDK. I wanted to reduce the amount of code necessary to fetch entities, remove the code needed to add automatic retries and handle transient conditions, and give additional control, such as a way to cancel operations, obtain basic statistics on the calls, and control the maximum number of REST calls the API generates in an attempt to avoid throttling conditions in the first place (something you cannot do with the Azure SDK at this time). Strongly Typed Before diving into the code, the following examples rely on a strongly typed class called MyData. The way MyData is defined for the Azure SDK is similar to the Enzo Azure API, with the exception that they inherit from different classes. With the Azure SDK, classes that represent entities must inherit from TableServiceEntity, while classes with the Enzo Azure API must inherit from BaseAzureTable or implement a specific interface. // With the SDK public class MyData1 : TableServiceEntity {     public string Message { get; set; }     public string Level { get; set; }     public string Severity { get; set; } } //  With the Enzo Azure API public class MyData2 : BaseAzureTable {     public string Message { get; set; }     public string Level { get; set; }     public string Severity { get; set; } } Simpler Code Now that the classes representing an Azure Table entity are defined, let’s review the methods that the Azure SDK would look like when fetching all the entities from an Azure Table (note the use of a few variables: the _tableName variable stores the name of the Azure Table, and the ConnectionString property returns the connection string for the Storage Account containing the table): // With the Azure SDK public List<MyData1> FetchAllEntities() {      CloudStorageAccount storageAccount = CloudStorageAccount.Parse(ConnectionString);      CloudTableClient tableClient = storageAccount.CreateCloudTableClient();      TableServiceContext serviceContext = tableClient.GetDataServiceContext();      CloudTableQuery<MyData1> partitionQuery =         (from e in serviceContext.CreateQuery<MyData1>(_tableName)         select new MyData1()         {            PartitionKey = e.PartitionKey,            RowKey = e.RowKey,            Timestamp = e.Timestamp,            Message = e.Message,            Level = e.Level,            Severity = e.Severity            }).AsTableServiceQuery<MyData1>();        return partitionQuery.ToList();  } This code gives you automatic retries because the AsTableServiceQuery does that for you. Also, note that this method is strongly-typed because it is using LINQ. Although this doesn’t look like too much code at first glance, you are actually mapping the strongly-typed object manually. So for larger entities, with dozens of properties, your code will grow. And from a maintenance standpoint, when a new property is added, you may need to change the mapping code. You will also note that the mapping being performed is optional; it is desired when you want to retrieve specific properties of the entities (not all) to reduce the network traffic. If you do not specify the properties you want, all the properties will be returned; in this example we are returning the Message, Level and Severity properties (in addition to the required PartitionKey, RowKey and Timestamp). The Enzo Azure API does the mapping automatically and also handles automatic reties when fetching entities. The equivalent code to fetch all the entities (with the same three properties) from the same Azure Table looks like this: // With the Enzo Azure API public List<MyData2> FetchAllEntities() {        AzureTable at = new AzureTable(_accountName, _accountKey, _ssl, _tableName);        List<MyData2> res = at.Fetch<MyData2>("", "Message,Level,Severity");        return res; } As you can see, the Enzo Azure API returns the entities already strongly typed, so there is no need to map the output. Also, the Enzo Azure API makes it easy to specify the list of properties to return, and to specify a filter as well (no filter was provided in this example; the filter is passed as the first parameter).  Fetch Strategies Both approaches discussed above fetch the data sequentially. In addition to the linear/sequential fetch methods, the Enzo Azure API provides specific fetch strategies. Fetch strategies are designed to prepare a set of REST calls, executed in parallel, in a way that performs faster that if you were to fetch the data sequentially. For example, if the PartitionKey is a GUID string, you could prepare multiple calls, providing appropriate filters ([‘a’, ‘b’[, [‘b’, ‘c’[, [‘c’, ‘d[, …), and send those calls in parallel. As you can imagine, the code necessary to create these requests would be fairly large. With the Enzo Azure API, two strategies are provided out of the box: the GUID and List strategies. If you are interested in how these strategies work, see the Enzo Azure API Online Help. Here is an example code that performs parallel requests using the GUID strategy (which executes more than 2 t o3 times faster than the sequential methods discussed previously): public List<MyData2> FetchAllEntitiesGUID() {     AzureTable at = new AzureTable(_accountName, _accountKey, _ssl, _tableName);     List<MyData2> res = at.FetchWithGuid<MyData2>("", "Message,Level,Severity");     return res; } Faster Results With Sequential Fetch Methods Developing a faster API wasn’t a primary objective; but it appears that the performance tests performed with the Enzo Azure API deliver the data a little faster out of the box (5%-10% on average, and sometimes to up 50% faster) with the sequential fetch methods. Although the amount of data is the same regardless of the approach (and the REST calls are almost exactly identical), the object mapping approach is different. So it is likely that the slight performance increase is due to a lighter API. Using LINQ offers many advantages and tremendous flexibility; nevertheless when fetching data it seems that the Enzo Azure API delivers faster.  For example, the same code previously discussed delivered the following results when fetching 3,000 entities (about 1KB each). The average elapsed time shows that the Azure SDK returned the 3000 entities in about 5.9 seconds on average, while the Enzo Azure API took 4.2 seconds on average (39% improvement). With Fetch Strategies When using the fetch strategies we are no longer comparing apples to apples; the Azure SDK is not designed to implement fetch strategies out of the box, so you would need to code the strategies yourself. Nevertheless I wanted to provide out of the box capabilities, and as a result you see a test that returned about 10,000 entities (1KB each entity), and an average execution time over 5 runs. The Azure SDK implemented a sequential fetch while the Enzo Azure API implemented the List fetch strategy. The fetch strategy was 2.3 times faster. Note that the following test hit a limit on my network bandwidth quickly (3.56Mbps), so the results of the fetch strategy is significantly below what it could be with a higher bandwidth. Additional Methods The API wouldn’t be complete without support for a few important methods other than the fetch methods discussed previously. The Enzo Azure API offers these additional capabilities: - Support for batch updates, deletes and inserts - Conversion of entities to DataRow, and List<> to a DataTable - Extension methods for Delete, Merge, Update, Insert - Support for asynchronous calls and cancellation - Support for fetch statistics (total bytes, total REST calls, retries…) For more information, visit http://www.bluesyntax.net or go directly to the Enzo Azure API page (http://www.bluesyntax.net/EnzoAzureAPI.aspx). About Herve Roggero Herve Roggero, Windows Azure MVP, is the founder of Blue Syntax Consulting, a company specialized in cloud computing products and services. Herve's experience includes software development, architecture, database administration and senior management with both global corporations and startup companies. Herve holds multiple certifications, including an MCDBA, MCSE, MCSD. He also holds a Master's degree in Business Administration from Indiana University. Herve is the co-author of "PRO SQL Azure" from Apress and runs the Azure Florida Association (on LinkedIn: http://www.linkedin.com/groups?gid=4177626). For more information on Blue Syntax Consulting, visit www.bluesyntax.net.

    Read the article

  • Bing maps silverlight control custom pushpin

    - by Razvi
    I tried to make a custom pushpin for the Bing Maps silverlight control, but I can only add 1 pushpin. At the second pushpin I get the following error: System.ArgumentException: Value does not fall within the expected range. at MS.Internal.XcpImports.CheckHResult(UInt32 hr) at MS.Internal.XcpImports.Collection_AddValue[T](PresentationFrameworkCollection`1 collection, CValue value) at MS.Internal.XcpImports.Collection_AddDependencyObject[T](PresentationFrameworkCollection`1 collection, DependencyObject value) at System.Windows.PresentationFrameworkCollection`1.AddDependencyObject(DependencyObject value) at System.Windows.Controls.UIElementCollection.AddInternal(UIElement value) at System.Windows.PresentationFrameworkCollection`1.Add(T value) at MapInfo.Silverlight.CitiesControl.MainPage.c_GetCitiesCompleted(Object sender, GetCitiesCompletedEventArgs e) Does anyone know what I might be doing wrong? I am setting the following properties before adding it to the map: public Location Location { get { return this.GetValue(MapLayer.PositionProperty) as Location; } set { this.SetValue(MapLayer.PositionProperty, value); } } this.SetValue(MapLayer.PositionOriginProperty, PositionOrigin.BottomLeft);

    Read the article

  • Bing Maps - how to link to a push pin from a link outside the map

    - by Rajah
    I have a Virtual Earth Maps (Bing Maps??) to which I have added a set of pushpins. Each pushpin is labelled 1 to n. In addition to adding pushpins to the map, I also add text to the web-page that contains the description to each pushpin. I would like to add a link to the text outside the map, that when clicked will open the balloon associated with the corresponding pushpin. How do I open the balloon associated with a pushpin, through a link that exists outside the map? To get a better understanding, look at my map: link. When you click load, PushPins are added to the map. I would like to have a link from the list on the right of the map, that opens the corresponding PushPin. Thanks in advance!

    Read the article

  • Translate Languages in IE 8 with Bing Translator

    - by Asian Angel
    Do you need side by side or hover language translations while browsing? Then join us as we look at the Bing Translator accelerator for Internet Explorer 8. Note: This article is geared towards those who may not have used this accelerator before or declined to “add it” when setting up IE 8. Using Bing Translator Once you have clicked on Add to Internet Explorer and confirmed the installation your new accelerator is ready to use. For our example we chose a Norwegian news article. Right-click within the webpage to access the context menu entry for translating. Depending on the originating language, you may want to go ahead and set it manually before beginning the translation. The translation will be opened in a new tab… Note: The same entry can also be accessed through the All Accelerators listing. There are four settings available for viewing your translations: side by side, top/bottom, original with hover translation, & translation with hover original. First a look at the side by side view. When maximized the window area will be divided 50/50 and as you hover your mouse or scroll in one side the same action will occur simultaneously in the other side. The top/bottom view. As above browser actions occur simultaneously in both sections. The original with hover translation view. Especially helpful if you are studying a new language and want to check your level of understanding for the original language. The translation with original hover view. Four different viewing options make it easy to find the one that best suits your needs. Conclusion If you need a convenient way to translate between languages in Internet Explorer 8, then the Bing Translator accelerator just might be what you have been looking for. Links Add the Bing Translator accelerator to Internet Explorer 8 Similar Articles Productive Geek Tips Quickly Translate Text to Another Language in Word 2007Add Google Translation Power to FirefoxTranslate Foreign Website Text to your Native LanguageAuto Translate Text in Google ChromeView Word Definitions in IE 8 with the Define with Bing Accelerator TouchFreeze Alternative in AutoHotkey The Icy Undertow Desktop Windows Home Server – Backup to LAN The Clear & Clean Desktop Use This Bookmarklet to Easily Get Albums Use AutoHotkey to Assign a Hotkey to a Specific Window Latest Software Reviews Tinyhacker Random Tips HippoRemote Pro 2.2 Xobni Plus for Outlook All My Movies 5.9 CloudBerry Online Backup 1.5 for Windows Home Server 24 Million Sites Windows Media Player Glass Icons (icons we like) How to Forecast Weather, without Gadgets Outlook Tools, one stop tweaking for any Outlook version Zoofs, find the most popular tweeted YouTube videos Video preview of new Windows Live Essentials

    Read the article

  • Doing unit and integration tests with the Web API HttpClient

    - by cibrax
    One of the nice things about the new HttpClient in System.Net.Http is the support for mocking responses or handling requests in a http server hosted in-memory. While the first option is useful for scenarios in which we want to test our client code in isolation (unit tests for example), the second one enables more complete integration testing scenarios that could include some more components in the stack such as model binders or message handlers for example.   The HttpClient can receive a HttpMessageHandler as argument in one of its constructors. public class HttpClient : HttpMessageInvoker { public HttpClient(); public HttpClient(HttpMessageHandler handler); public HttpClient(HttpMessageHandler handler, bool disposeHandler); .csharpcode, .csharpcode pre { font-size: small; color: black; font-family: consolas, "Courier New", courier, monospace; background-color: #ffffff; /*white-space: pre;*/ } .csharpcode pre { margin: 0em; } .csharpcode .rem { color: #008000; } .csharpcode .kwrd { color: #0000ff; } .csharpcode .str { color: #006080; } .csharpcode .op { color: #0000c0; } .csharpcode .preproc { color: #cc6633; } .csharpcode .asp { background-color: #ffff00; } .csharpcode .html { color: #800000; } .csharpcode .attr { color: #ff0000; } .csharpcode .alt { background-color: #f4f4f4; width: 100%; margin: 0em; } .csharpcode .lnum { color: #606060; } For the first scenario, you can create a new HttpMessageHandler that fakes the response, which you can use in your unit test. The only requirement is that you somehow inject an HttpClient with this custom handler in the client code. public class FakeHttpMessageHandler : HttpMessageHandler { HttpResponseMessage response; public FakeHttpMessageHandler(HttpResponseMessage response) { this.response = response; } protected override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, System.Threading.CancellationToken cancellationToken) { var tcs = new TaskCompletionSource<HttpResponseMessage>(); tcs.SetResult(response); return tcs.Task; } } .csharpcode, .csharpcode pre { font-size: small; color: black; font-family: consolas, "Courier New", courier, monospace; background-color: #ffffff; /*white-space: pre;*/ } .csharpcode pre { margin: 0em; } .csharpcode .rem { color: #008000; } .csharpcode .kwrd { color: #0000ff; } .csharpcode .str { color: #006080; } .csharpcode .op { color: #0000c0; } .csharpcode .preproc { color: #cc6633; } .csharpcode .asp { background-color: #ffff00; } .csharpcode .html { color: #800000; } .csharpcode .attr { color: #ff0000; } .csharpcode .alt { background-color: #f4f4f4; width: 100%; margin: 0em; } .csharpcode .lnum { color: #606060; } In an unit test, you can do something like this. var fakeResponse = new HttpResponse(); var fakeHandler = new FakeHttpMessageHandler(fakeResponse); var httpClient = new HttpClient(fakeHandler); var customerService = new CustomerService(httpClient); // Do something // Asserts .csharpcode, .csharpcode pre { font-size: small; color: black; font-family: consolas, "Courier New", courier, monospace; background-color: #ffffff; /*white-space: pre;*/ } .csharpcode pre { margin: 0em; } .csharpcode .rem { color: #008000; } .csharpcode .kwrd { color: #0000ff; } .csharpcode .str { color: #006080; } .csharpcode .op { color: #0000c0; } .csharpcode .preproc { color: #cc6633; } .csharpcode .asp { background-color: #ffff00; } .csharpcode .html { color: #800000; } .csharpcode .attr { color: #ff0000; } .csharpcode .alt { background-color: #f4f4f4; width: 100%; margin: 0em; } .csharpcode .lnum { color: #606060; } CustomerService in this case is the class under test, and the one that receives an HttpClient initialized with our fake handler. For the second scenario in integration tests, there is a In-Memory host “System.Web.Http.HttpServer” that also derives from HttpMessageHandler and you can use with a HttpClient instance in your test. This has been discussed already in these two great posts from Pedro and Filip. 

    Read the article

  • Eloqua API Full Code Example in JAVA

    - by Shawn Spencer
    Is there anyone out there who has mastered to retrieve some data programmatically from Eloqua? First of all, I'm more or less a newbie, as far as JAVA. I can follow tutorials, take directions and will Google till my fingers bleed. I understand the basics and am slightly familiar with OOP. My main problem is that I have a Friday deadline (and tomorrow is Thanksgiving). At any rate, all the Eloqua code snippets (that I've been able to find) illustrate one aspect of a specific issue, and that's it. In my case, I would greatly appreciate a JAVA project of some sort, with all the necessary files to do web services (WSDL, SOAP and perhaps WSIT) and the main class and all that included. No, I don't want you to do my work for me! Just give me enough to find my way around, enter the information I need to retrieve and all that. I'll take it from there. Any pointers, links or suggestions?

    Read the article

  • Searching for an online shop accessible via API

    - by Simon A. Eugster
    I need an online shop with a custom interface (customizing items with Ajax, with a preview included). Writing it myself does not make too much sense (implementing all the payment options etc.), so I would like to use an existing online shop (OpenSource). I would like to build my own UI which, for example, tells the shop to add an item to its cart -- i.e. without using the online shop's native UI. More precisely, it should be an online gallery where the user can directly order an image if he likes it. The final checkout/payment page can be native again. Is there a shop system that supports this? Or is it still faster to write it on my own? Or are there better options?

    Read the article

  • Web api authentication techniques

    - by Steve
    We have a asp.net MVC web service framework for serving out xml/json for peoples Get requests but are struggling to figure out the best way (fast, easy, trivial for users coding with javascript or OO languages) to authenticate users. It's not that our data is sensitive or anything, we just want users to register so we can have their email address to notify them of changes and track usage. In our previous attempt we had the username in the URI and would just make sure that username existed and increment db tables with usage. This was super basic but we'd notice people using demo as a username etc so we need it to be a little more sophisticated. What authentication techniques are available? What do the major players use/do.

    Read the article

  • Using Dynamic LINQ to get a filter for my Web API

    - by Espo
    We are considering using the Dynamic.CS linq-sample included in the "Samples" directory of visual studio 2008 for our WebAPI project to allow clients to query our data. The interface would be something like this (In addition to the normal GET-methods): public HttpResponseMessage List(string filter = null); The plan is to use the dynamic library to parse the "filter"-variable and then execute the query agains the DB. Any thoughts if this is a good idea? Is it a security problem?

    Read the article

  • How to learn an API

    - by inovaovao
    When I find some interesting project (e.g. on GitHub) I often would like to use it and try it out to see how it works, but if there isn't a good documentation or some kind of tutorial it's hard to figure out how to use it. So my question is: how do you approach such a situation? How do you figure out which classes are important and how to chain them to put them to use? What would you look at first? An advice I found is to look at the tests (if there are any). But if there are unit tests for every class, how do you know which ones to look at first?

    Read the article

  • What is a reasonly priced map API solution for a startup?

    - by Kevin
    I've been developing my application with Google Maps and the wonderful rails plugin for it, expecting to find that when I put my app into production that the commercial licensing wouldn't be too expensive. Then I found out it cost $10,000/year, no exceptions so far. http://www.47hats.com/2009/07/google-maps-the-10k-gotcha/ That's not a terrible price to pay for unlimited usage when your site becomes successful, but for those of us trying to build something from the ground up, that's a hefty price to pay. I've looked at Bing and Yahoo but they're very wishy-washy with what ballpark the pricing is. That on top of the fact I have to ditch my nice rails plugin YM4R for Google maps... Is anyone out there using a map API solution that doesn't cost an arm and a leg to get started with in a commercial aspect? I don't mind not using a plugin, I just need something that will work and is cost affordable in the beginning.

    Read the article

  • AJAX PopupControl Extender with Bing Maps

    - by Morano88
    Hey! I want to use AJAX PopupControl Extender with a text box so when a user clicks on the text box a popup that contains the Bing Map appears. I'm using the following code but I don't know why it is not working ? <asp:ScriptManager ID="ScriptManager1" runat="server"> </asp:ScriptManager> <asp:Label ID="Label1" runat="server" Font-Bold="true" Font-Size="14px" Text="Click inside the textbox to open AJAX Popup Control:"></asp:Label> <div class="clear"><br /></div> <asp:TextBox ID="TextBox1" CssClass="textbox" runat="server" Width="200px"></asp:TextBox> <html> <head> <title></title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <script type="text/javascript" src="http://ecn.dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=6.2"></script> <script type="text/javascript"> var map = null; function GetMap() { map = new VEMap('myMap'); map.LoadMap(new VELatLong(47.6, -122.33), 10 ,'h' ,false); } </script> </head> <body onload="GetMap();"> <div id='myMap' style="position:relative; width:400px; height:400px;"></div> </body> </html> <ajaxToolkit:PopupControlExtender ID="PopupControlExtender1" runat="server" CommitProperty="foreColor" Position="Right" TargetControlID="TextBox1" PopupControlID="myMap" OffsetX="2" OffsetY="2"> </ajaxToolkit:PopupControlExtender> what's wrong ?

    Read the article

  • MapItemsControls not updating Silverlight Bing Map

    - by Matt
    I'm using a MapItemsControl to control my Pushpin items within my Bing silverlight map. Right on the page load, I add a new pin programatically, and the pin shows up on the map. However I've now taken it further and I'm adding pins to my datasource via a click on the map. The new pins add to my datasource, but do not show up on the map. Do I need to rebind my datasource to my map control or somehow refresh the datasource? Here's some code <UserControl.Resources> <DataTemplate x:Key="PinData"> <m:Pushpin Location="{Binding Location}" PositionOrigin="BottomCenter" Width="Auto" Height="Auto" Cursor="Hand"> <m:Pushpin.Template> <ControlTemplate> <Grid> <myTestApp:MasterPin DataContext="{Binding}"/> </Grid> </ControlTemplate> </m:Pushpin.Template> </m:Pushpin> </DataTemplate> </UserControl.Resources> <Grid x:Name="LayoutRoot" Background="White"> <m:Map x:Name="myMap" CredentialsProvider="" Mode="Road" ScaleVisibility="Collapsed" > <m:MapItemsControl x:Name="mapItems" ItemTemplate="{StaticResource PinData}"/> </m:Map> </Grid> public partial class Map : UserControl { private List< BasePin > dataSource = new List< BasePin >(); public Map() { InitializeComponent(); _Initialize(); } private void _Initialize() { //this part works and adds a pin to the map dataSource.Add( new BaseSite( -33.881532, 18.440208 ) ); myMap.MouseClick += Map_MouseClick; mapItems.ItemsSource = dataSource; } public void Map_MouseClick(object sender, MapMouseEventArgs e)) { BasePin pin = new BasePin(); pin.Location = myMap.ViewportPointToLocation( e.ViewportPoint ); dataSource.Add( pin ); } }

    Read the article

  • Bitbucket API authentication with Python's HTTPBasicAuthHandler

    - by jbochi
    I'm trying to get the list of issues on a private repository using bitbucket's API. I have confirmed that HTTP Basic authentication works with hurl, but I am unable to authenticate in Python. Adapting the code from this tutorial, I have written the following script. import cookielib import urllib2 class API(): api_url = 'http://api.bitbucket.org/1.0/' def __init__(self, username, password): self._opener = self._create_opener(username, password) def _create_opener(self, username, password): cj = cookielib.LWPCookieJar() cookie_handler = urllib2.HTTPCookieProcessor(cj) password_manager = urllib2.HTTPPasswordMgrWithDefaultRealm() password_manager.add_password(None, self.api_url, username, password) auth_handler = urllib2.HTTPBasicAuthHandler(password_manager) opener = urllib2.build_opener(cookie_handler, auth_handler) return opener def get_issues(self, username, repository): query_url = self.api_url + 'repositories/%s/%s/issues/' % (username, repository) try: handler = self._opener.open(query_url) except urllib2.HTTPError, e: print e.headers raise e return handler.read() api = API(username='my_username', password='XXXXXXXX') api.get_issues('my_username', 'my_repository') results in: >>> Server: nginx/0.7.62 Date: Mon, 19 Apr 2010 16:15:06 GMT Content-Type: text/plain Connection: close Vary: Authorization,Cookie Content-Length: 9 Traceback (most recent call last): File "C:/USERS/personal/bitbucket-burndown/bitbucket-api.py", line 29, in <module> print api.get_issues('my_username', 'my_repository') File "C:/USERS/personal/bitbucket-burndown/bitbucket-api.py", line 25, in get_issues raise e HTTPError: HTTP Error 401: UNAUTHORIZED api.get_issues('jespern', 'bitbucket') works like a charm. What's wrong with my code?

    Read the article

  • Symfony routing with an API Web Service

    - by fesja
    Hi, I'm finishing the API of our web service. Now I'm thinking on how to make the route changes, so if we decide to make a new version we don't break the first API. right now: url: /api/:action param: { module: api, action: :action } requirements: sf_format: (?:xml|json) what i've thought: url: /api/v1/:module/:action param: { module: api1, action: :action } requirements: sf_format: (?:xml|json) url: /api/v2/:module/:action param: { module: api2, action: :action } requirements: sf_format: (?:xml|json) That's easy, but the perfect solution would be to have the following kind of route # Automatically redirects to one module or another url: /api/v:version/:module/:action param: { module: api:version, action: :action } requirements: sf_format: (?:xml|json) any ideas on how to do it? what do you recommend us to do? thanks!

    Read the article

  • ASP.Net Web API Routing fails when api is created as a web application under another asp.net site in IIS

    - by neo
    I developed a rest api using ASP.net web api. When I deploy this rest api on iis, I need to create it as a web application under an asp.net web site. When I was deploying the rest api as a new web site in iis, then things worked fine. I was using the following Route api/{controller}/{id}. When I created the rest api as a web application underneath asp.net web site project, I named the web application as api. I can't access the api methods now. Can someone point what I do wrong?

    Read the article

< Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >