Skip to content

Commit

Permalink
Merge pull request #15 from manojkulkarni30/dev
Browse files Browse the repository at this point in the history
Sample project is added
  • Loading branch information
manojkulkarni30 authored Jan 16, 2017
2 parents 42ba502 + ff530c0 commit e2d9741
Show file tree
Hide file tree
Showing 226 changed files with 57,397 additions and 11 deletions.
56 changes: 56 additions & 0 deletions GravatarHelper.NetStandard.sln
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{B8C83836-0
EndProject
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "GravatarHelper.NetStandard.Tests", "test\GravatarHelper.NetStandard.Tests\GravatarHelper.NetStandard.Tests.xproj", "{7A542659-2330-40B7-B3C0-40696D9C0530}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "samples", "samples", "{3DED5220-4801-4894-8D9D-8B01F23128FC}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "AspNetCore", "AspNetCore", "{0517B0FC-764F-47F0-8CE5-587F53BBE484}"
EndProject
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "AspNetCoreApp", "samples\AspNetCore\AspNetCoreApp\AspNetCoreApp.xproj", "{01C10CB7-59EF-4B71-8656-978193AC8CF6}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Ad-Hoc|Any CPU = Ad-Hoc|Any CPU
Expand Down Expand Up @@ -140,12 +146,62 @@ Global
{7A542659-2330-40B7-B3C0-40696D9C0530}.Release|x64.Build.0 = Release|Any CPU
{7A542659-2330-40B7-B3C0-40696D9C0530}.Release|x86.ActiveCfg = Release|Any CPU
{7A542659-2330-40B7-B3C0-40696D9C0530}.Release|x86.Build.0 = Release|Any CPU
{01C10CB7-59EF-4B71-8656-978193AC8CF6}.Ad-Hoc|Any CPU.ActiveCfg = Debug|Any CPU
{01C10CB7-59EF-4B71-8656-978193AC8CF6}.Ad-Hoc|Any CPU.Build.0 = Debug|Any CPU
{01C10CB7-59EF-4B71-8656-978193AC8CF6}.Ad-Hoc|ARM.ActiveCfg = Debug|Any CPU
{01C10CB7-59EF-4B71-8656-978193AC8CF6}.Ad-Hoc|ARM.Build.0 = Debug|Any CPU
{01C10CB7-59EF-4B71-8656-978193AC8CF6}.Ad-Hoc|iPhone.ActiveCfg = Debug|Any CPU
{01C10CB7-59EF-4B71-8656-978193AC8CF6}.Ad-Hoc|iPhone.Build.0 = Debug|Any CPU
{01C10CB7-59EF-4B71-8656-978193AC8CF6}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Debug|Any CPU
{01C10CB7-59EF-4B71-8656-978193AC8CF6}.Ad-Hoc|iPhoneSimulator.Build.0 = Debug|Any CPU
{01C10CB7-59EF-4B71-8656-978193AC8CF6}.Ad-Hoc|x64.ActiveCfg = Debug|Any CPU
{01C10CB7-59EF-4B71-8656-978193AC8CF6}.Ad-Hoc|x64.Build.0 = Debug|Any CPU
{01C10CB7-59EF-4B71-8656-978193AC8CF6}.Ad-Hoc|x86.ActiveCfg = Debug|Any CPU
{01C10CB7-59EF-4B71-8656-978193AC8CF6}.Ad-Hoc|x86.Build.0 = Debug|Any CPU
{01C10CB7-59EF-4B71-8656-978193AC8CF6}.AppStore|Any CPU.ActiveCfg = Debug|Any CPU
{01C10CB7-59EF-4B71-8656-978193AC8CF6}.AppStore|Any CPU.Build.0 = Debug|Any CPU
{01C10CB7-59EF-4B71-8656-978193AC8CF6}.AppStore|ARM.ActiveCfg = Debug|Any CPU
{01C10CB7-59EF-4B71-8656-978193AC8CF6}.AppStore|ARM.Build.0 = Debug|Any CPU
{01C10CB7-59EF-4B71-8656-978193AC8CF6}.AppStore|iPhone.ActiveCfg = Debug|Any CPU
{01C10CB7-59EF-4B71-8656-978193AC8CF6}.AppStore|iPhone.Build.0 = Debug|Any CPU
{01C10CB7-59EF-4B71-8656-978193AC8CF6}.AppStore|iPhoneSimulator.ActiveCfg = Debug|Any CPU
{01C10CB7-59EF-4B71-8656-978193AC8CF6}.AppStore|iPhoneSimulator.Build.0 = Debug|Any CPU
{01C10CB7-59EF-4B71-8656-978193AC8CF6}.AppStore|x64.ActiveCfg = Debug|Any CPU
{01C10CB7-59EF-4B71-8656-978193AC8CF6}.AppStore|x64.Build.0 = Debug|Any CPU
{01C10CB7-59EF-4B71-8656-978193AC8CF6}.AppStore|x86.ActiveCfg = Debug|Any CPU
{01C10CB7-59EF-4B71-8656-978193AC8CF6}.AppStore|x86.Build.0 = Debug|Any CPU
{01C10CB7-59EF-4B71-8656-978193AC8CF6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{01C10CB7-59EF-4B71-8656-978193AC8CF6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{01C10CB7-59EF-4B71-8656-978193AC8CF6}.Debug|ARM.ActiveCfg = Debug|Any CPU
{01C10CB7-59EF-4B71-8656-978193AC8CF6}.Debug|ARM.Build.0 = Debug|Any CPU
{01C10CB7-59EF-4B71-8656-978193AC8CF6}.Debug|iPhone.ActiveCfg = Debug|Any CPU
{01C10CB7-59EF-4B71-8656-978193AC8CF6}.Debug|iPhone.Build.0 = Debug|Any CPU
{01C10CB7-59EF-4B71-8656-978193AC8CF6}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
{01C10CB7-59EF-4B71-8656-978193AC8CF6}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
{01C10CB7-59EF-4B71-8656-978193AC8CF6}.Debug|x64.ActiveCfg = Debug|Any CPU
{01C10CB7-59EF-4B71-8656-978193AC8CF6}.Debug|x64.Build.0 = Debug|Any CPU
{01C10CB7-59EF-4B71-8656-978193AC8CF6}.Debug|x86.ActiveCfg = Debug|Any CPU
{01C10CB7-59EF-4B71-8656-978193AC8CF6}.Debug|x86.Build.0 = Debug|Any CPU
{01C10CB7-59EF-4B71-8656-978193AC8CF6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{01C10CB7-59EF-4B71-8656-978193AC8CF6}.Release|Any CPU.Build.0 = Release|Any CPU
{01C10CB7-59EF-4B71-8656-978193AC8CF6}.Release|ARM.ActiveCfg = Release|Any CPU
{01C10CB7-59EF-4B71-8656-978193AC8CF6}.Release|ARM.Build.0 = Release|Any CPU
{01C10CB7-59EF-4B71-8656-978193AC8CF6}.Release|iPhone.ActiveCfg = Release|Any CPU
{01C10CB7-59EF-4B71-8656-978193AC8CF6}.Release|iPhone.Build.0 = Release|Any CPU
{01C10CB7-59EF-4B71-8656-978193AC8CF6}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
{01C10CB7-59EF-4B71-8656-978193AC8CF6}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
{01C10CB7-59EF-4B71-8656-978193AC8CF6}.Release|x64.ActiveCfg = Release|Any CPU
{01C10CB7-59EF-4B71-8656-978193AC8CF6}.Release|x64.Build.0 = Release|Any CPU
{01C10CB7-59EF-4B71-8656-978193AC8CF6}.Release|x86.ActiveCfg = Release|Any CPU
{01C10CB7-59EF-4B71-8656-978193AC8CF6}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{2320FE5D-B009-4969-A7E1-56E575D5491D} = {51BB0D55-DE86-42BD-B0F2-BF65053A8C05}
{7A542659-2330-40B7-B3C0-40696D9C0530} = {B8C83836-05B0-47DC-A033-0C57EA0F16EC}
{0517B0FC-764F-47F0-8CE5-587F53BBE484} = {3DED5220-4801-4894-8D9D-8B01F23128FC}
{01C10CB7-59EF-4B71-8656-978193AC8CF6} = {0517B0FC-764F-47F0-8CE5-587F53BBE484}
EndGlobalSection
EndGlobal
83 changes: 79 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,91 @@

A simple [.Net standard library](https://docs.microsoft.com/en-us/dotnet/articles/standard/library) to easily get profile picture, QR code image for profile and profile information for a user from [Gravatar](http://en.gravatar.com/).

#### Build Status:

## Setup
- Available on Nuget: https://www.nuget.org/packages/GravatarHelper.NetStandard/1.0.0-beta
- To use this library in Xamarin.Forms application, install the [GravatarHelper.NetStandard](https://www.nuget.org/packages/GravatarHelper.NetStandard/1.0.0-beta) nuget package in portable class library and [PCLCrypto](https://www.nuget.org/packages/PCLCrypto/) package in each client project (e.g Android, iOS and UWP).

## Build Status

![App Veyor](https://ci.appveyor.com/api/projects/status/9gwwfn9lb0bxq846?svg=true)
[![MyGet CI](https://img.shields.io/myget/manojkulkarni30/v/GravatarHelper.NetStandard.svg)](http://myget.org/gallery/manojkulkarni30)
[![NuGet](https://img.shields.io/nuget/v/GravatarHelper.NetStandard.svg)](https://www.nuget.org/packages/GravatarHelper.NetStandard/)

#### Setup
## Supported Platform
- .NetFramework 3.5
- .NetFramework 4
- .NetFramework 4.5
- .NetFramework 4.5.1
- .NetFramework 4.5.2
- .NetFramework 4.6
- .NetFramework 4.6.1
- .NetFramework 4.6.2
- .NetStandard 1.3
- Portable Class Library (.NETFramework 4.5, Windows 8.0, WindowsPhone 8.0, WindowsPhoneApp 8.1)- Profile 259

## How To Get Gravatar Image URL ?

To get gravatar image url for email address "[[email protected]](mailto:[email protected])", use the following syntax in web application.

```html

<!--Returns Gravatar image url over http-->
<img src='@Gravatar.GetGravatarImageUrl("[email protected]")'/>

```
To get image url over https use following syntax
```html

<!--Returns Gravatar image url over https-->
<img src='@Gravatar.GetSecureGravatarImageUrl("[email protected]")'/>

```
There are different overload methods available where you can specify different parameters like image size, file extension, rating, gravatar default image type etc.

## How To Get the QR Code Image For Gravatar Profile ?

To get the QR code image for email address "[[email protected]](mailto:[email protected])", use the following syntax in web application

```html

<img src='@Gravatar.GetGravatarProfileQrCodeImage("[email protected]")'/>

```

## How To Get The Gravatar Profile Information ?

To get the gravatar profile information for a user using email address "[[email protected]](mailto:[email protected])", use the following syntax.

```csharp

// Available only for .Net Framework 4.5 and above
await Gravatar.GetGravatarProfileInformationAsync("[email protected]");

// For .Net Framework 3.5 and 4.0
GetGravatarProfileInformation("[email protected]");

```
Above method will return an object of type ```OperationResult```.

```csharp

public class OperationResult
{
public bool Success { get; set; }

public ProfileInformation Profile { get; set; }

public string Error { get; set; }
}

```
If request for profile information is successful, then ```Success``` property will be set to true and ```Profile``` object will contain the profile information.

If request for profile information failed, then ```Success``` property will be set to false, ```Profile``` object will be ```null``` and ```Error``` property will contain the error message.

- Pre-release version of this package is available for download on [nuget](https://www.nuget.org/packages/GravatarHelper.NetStandard/1.0.0-beta).
**Note: Profile requests will only resolve for the primary email address**

#### License
## License

[Apache 2.0](https://github.com/manojkulkarni30/GravatarHelper.NetStandard/blob/master/License.txt)
7 changes: 2 additions & 5 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
version: '{build}'
pull_requests:
do_not_increment_build_number: true
branches:
only:
- master
nuget:
disable_publish_on_pr: true
build_script:
Expand All @@ -19,11 +16,11 @@ deploy:
secure: /kkvZoE04QHo7umHPGp6NTCbp8tNuuc/SSpaxlGU0QI+l9hibm3ONK3v3MvFVcqC
skip_symbols: true
on:
branch: master
branch: master, dev
- provider: NuGet
name: production
api_key:
secure: wOB2AdXDbuwFYNzEp9tulWBF8f4CZY54pzAdUEdlaPBMQ6NBdWhY5FOorPE6RjGG
on:
branch: master
branch: master, dev
appveyor_repo_tag: true
3 changes: 3 additions & 0 deletions samples/AspNetCore/AspNetCoreApp/.bowerrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"directory": "wwwroot/lib"
}
23 changes: 23 additions & 0 deletions samples/AspNetCore/AspNetCoreApp/AspNetCoreApp.xproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">14.0</VisualStudioVersion>
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
</PropertyGroup>
<Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.Props" Condition="'$(VSToolsPath)' != ''" />
<PropertyGroup Label="Globals">
<ProjectGuid>01c10cb7-59ef-4b71-8656-978193ac8cf6</ProjectGuid>
<RootNamespace>AspNetCoreApp</RootNamespace>
<BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)'=='' ">.\obj</BaseIntermediateOutputPath>
<OutputPath Condition="'$(OutputPath)'=='' ">.\bin\</OutputPath>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
</PropertyGroup>
<PropertyGroup>
<SchemaVersion>2.0</SchemaVersion>
</PropertyGroup>
<ItemGroup>
<DnxInvisibleContent Include="bower.json" />
<DnxInvisibleContent Include=".bowerrc" />
</ItemGroup>
<Import Project="$(VSToolsPath)\DotNet.Web\Microsoft.DotNet.Web.targets" Condition="'$(VSToolsPath)' != ''" />
</Project>
17 changes: 17 additions & 0 deletions samples/AspNetCore/AspNetCoreApp/Controllers/HomeController.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
using Microsoft.AspNetCore.Mvc;

namespace AspNetCoreApp.Controllers
{
public class HomeController : Controller
{
public IActionResult Index()
{
return View();
}

public IActionResult Error()
{
return View();
}
}
}
24 changes: 24 additions & 0 deletions samples/AspNetCore/AspNetCoreApp/Program.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Hosting;

namespace AspNetCoreApp
{
public class Program
{
public static void Main(string[] args)
{
var host = new WebHostBuilder()
.UseKestrel()
.UseContentRoot(Directory.GetCurrentDirectory())
.UseIISIntegration()
.UseStartup<Startup>()
.Build();

host.Run();
}
}
}
Loading

0 comments on commit e2d9741

Please sign in to comment.