for now...dont deal with the default image
This commit is contained in:
@@ -32,11 +32,10 @@ namespace GravatarWrapper
|
||||
return sBuilder.ToString(); // Return the hexadecimal string.
|
||||
}
|
||||
|
||||
public static Bitmap Request(string email, int size, bool ShowDefaultImage)
|
||||
public static Bitmap Request(string email, int size)
|
||||
{
|
||||
var client = new RestClient("http://www.gravatar.com/avatar/" + HashEmailForGravatar(email));
|
||||
var req = new RestRequest(Method.GET);
|
||||
if (!ShowDefaultImage) req.AddParameter("d", "%22%22" );
|
||||
req.AddParameter("s", size);
|
||||
var res = client.Execute(req);
|
||||
if (res != null)
|
||||
|
||||
@@ -30,6 +30,10 @@
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="RestSharp, Version=104.4.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\packages\RestSharp.104.4.0\lib\net4\RestSharp.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Drawing" />
|
||||
@@ -40,6 +44,7 @@
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Exceptions\NoResponseReturnedException.cs" />
|
||||
<Compile Include="GravatarWrapper.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
|
||||
Reference in New Issue
Block a user