Skip to main content

Posts

Showing posts from March, 2017

Twitter API and Microsoft Text Analytics API in Python

Since we are getting closer to the French presidential election, and that I'm working on a project that involves using social media API and sentiment analysis, I've decide to post an example that will use these technologies to try and give an idea about each major candidate popularity. Solution description: 1. Collect social media information related to each candidate: For this example the main source is Twitter. 2. Extract sentiment for each Candidate from the Twitter posts collected previously. Implementation: For a quick implementation I decided to use python, but I'll definitely post a C# version as well. Code: 1. Twitter Client code: The code is pretty basic, I'm streaming the posts to a text file in son, by applying a list of filters; the names of the candidates I've decided to include: #Import the necessary methods from tweepy library from tweepy.streaming import StreamListener from tweepy import OAuthHandler from tweepy import Stream #Vari...

Getting started using Amazon Product Advertizing API in C#

Amazon Product API is a set of web services that are available for developers, to interact with Amazon e-commerce website (more details are available on Amazon website ): You can extract information about product: Get information about products, reviews, information about the company selling these items. Create a fully functional shopping cart The main goal for developers here is to advertise items sold on amazon website and get a commission from sales they generate through the associate program.(more details available on Amazon website ) Bellow I'm going to show a simple example on how to use this API: Pre-requisites: Become an Associate Become a Product Advertising API Developer Before coding you can try the web client provided by amazon: Product Advertising API Scratchpad Using the API: Now we can start coding. For this example I'm just going to create console app that calls the web service to retrieve some information: 1. List products for a given cate...