Skip to content
This repository was archived by the owner on Oct 30, 2018. It is now read-only.

Commit 2ae8383

Browse files
committed
Implemented the ranked image keywords api calls
1 parent b0ec3ae commit 2ae8383

16 files changed

+1343
-950
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,7 @@ example/author/bin/
44
example/combined/bin/
55
example/image/bin/
66
example/taxonomy/bin/
7+
example/AlchemyAPI.dll
8+
example/ranked_image_keywords/bin/
9+
module/AlchemyAPI.dll
10+
module/sdk/bin/

example/.gitignore

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
author.exe
2+
categories.exe
3+
combined.exe
4+
concepts.exe
5+
constraint_queries.exe
6+
entities.exe
7+
feed_links.exe
8+
image.exe
9+
keywords.exe
10+
language.exe
11+
microformats.exe
12+
parameters.exe
13+
ranked_image_keywords.exe
14+
relations.exe
15+
sentiment.exe
16+
taxonomy.exe
17+
text_extract.exe

example/build.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,6 @@ dmcs combined.cs -r:System.Data.dll -r:System.Web.dll -r:../module/AlchemyAPI.dl
3131
dmcs taxonomy.cs -r:System.Data.dll -r:System.Web.dll -r:../module/AlchemyAPI.dll
3232

3333
dmcs image.cs -r:System.Data.dll -r:System.Web.dll -r:../module/AlchemyAPI.dll
34+
35+
dmcs ranked_image_keywords.cs -r:System.Data.dll -r:System.Web.dll -r:../module/AlchemyAPI.dll
3436

example/data/fozzle.jpg

1.69 MB
Loading

example/ranked_image_keywords.cs

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
using System;
2+
using System.IO;
3+
using AlchemyAPI;
4+
5+
6+
public class TestApp
7+
{
8+
static public void Main ()
9+
{
10+
// Create an AlchemyAPI object.
11+
AlchemyAPI.AlchemyAPI alchemyObj = new AlchemyAPI.AlchemyAPI();
12+
13+
// Load an API key from disk.
14+
alchemyObj.LoadAPIKey("api_key.txt");
15+
16+
// Use the upload image class
17+
AlchemyAPI_RankedImageKeywords fozzle = new AlchemyAPI_RankedImageKeywords();
18+
fozzle.SetImage("data/fozzle.jpg");
19+
20+
string ret = alchemyObj.ImageGetRankedImageKeywords(fozzle);
21+
22+
Console.WriteLine(ret);
23+
}
24+
}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
using System.Reflection;
2+
using System.Runtime.CompilerServices;
3+
4+
// Information about this assembly is defined by the following attributes.
5+
// Change them to the values specific to your project.
6+
7+
[assembly: AssemblyTitle("ranked_image_keywords")]
8+
[assembly: AssemblyDescription("")]
9+
[assembly: AssemblyConfiguration("")]
10+
[assembly: AssemblyCompany("")]
11+
[assembly: AssemblyProduct("")]
12+
[assembly: AssemblyCopyright("mike")]
13+
[assembly: AssemblyTrademark("")]
14+
[assembly: AssemblyCulture("")]
15+
16+
// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}".
17+
// The form "{Major}.{Minor}.*" will automatically update the build and revision,
18+
// and "{Major}.{Minor}.{Build}.*" will update just the revision.
19+
20+
[assembly: AssemblyVersion("1.0.*")]
21+
22+
// The following attributes are used to specify the signing key for the assembly,
23+
// if desired. See the Mono documentation for more information about signing.
24+
25+
//[assembly: AssemblyDelaySign(false)]
26+
//[assembly: AssemblyKeyFile("")]
27+
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<PropertyGroup>
4+
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
5+
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
6+
<ProductVersion>10.0.0</ProductVersion>
7+
<SchemaVersion>2.0</SchemaVersion>
8+
<ProjectGuid>{181E3CCB-A081-4CA5-963D-CA41B9886683}</ProjectGuid>
9+
<OutputType>Exe</OutputType>
10+
<RootNamespace>ranked_image_keywords</RootNamespace>
11+
<AssemblyName>ranked_image_keywords</AssemblyName>
12+
</PropertyGroup>
13+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
14+
<DebugSymbols>true</DebugSymbols>
15+
<DebugType>full</DebugType>
16+
<Optimize>false</Optimize>
17+
<OutputPath>bin\Debug</OutputPath>
18+
<DefineConstants>DEBUG;</DefineConstants>
19+
<ErrorReport>prompt</ErrorReport>
20+
<WarningLevel>4</WarningLevel>
21+
<Externalconsole>true</Externalconsole>
22+
</PropertyGroup>
23+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
24+
<DebugType>none</DebugType>
25+
<Optimize>true</Optimize>
26+
<OutputPath>bin\Release</OutputPath>
27+
<ErrorReport>prompt</ErrorReport>
28+
<WarningLevel>4</WarningLevel>
29+
<Externalconsole>true</Externalconsole>
30+
</PropertyGroup>
31+
<ItemGroup>
32+
<Reference Include="System" />
33+
</ItemGroup>
34+
<ItemGroup>
35+
<Compile Include="AssemblyInfo.cs" />
36+
<Compile Include="..\ranked_image_keywords.cs">
37+
<Link>ranked_image_keywords.cs</Link>
38+
</Compile>
39+
</ItemGroup>
40+
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
41+
<ItemGroup>
42+
<None Include="..\api_key.txt">
43+
<Link>api_key.txt</Link>
44+
</None>
45+
</ItemGroup>
46+
<ItemGroup>
47+
<ProjectReference Include="..\..\module\sdk\sdk.csproj">
48+
<Project>{799E354F-E323-408C-9733-7F1896342663}</Project>
49+
<Name>sdk</Name>
50+
</ProjectReference>
51+
</ItemGroup>
52+
</Project>

0 commit comments

Comments
 (0)