Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions src/POSSIBLE.WordPress.XmlRpcClient/IWordPressClient.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
using POSSIBLE.WordPress.XmlRpcClient.Models;

namespace POSSIBLE.WordPress.XmlRpcClient
{
public interface IWordPressClient
{
UploadItem UploadFile(string filenameIncludingExtension, string pathToFileToUpload, string type = "image/jpeg");
}
}
2 changes: 1 addition & 1 deletion src/POSSIBLE.WordPress.XmlRpcClient/Models/MediaItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public struct MediaItem
public string title { get; set; }
public string caption { get; set; }
public string description { get; set; }
// public MediaItemMetadata metadata { get; set; }
public MediaItemMetadata metadata { get; set; }
public string thumbnail { get; set; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="CookComputing.XmlRpcV2, Version=3.0.0.0, Culture=neutral, PublicKeyToken=a7d6e17aa302004d, processorArchitecture=MSIL">
<Reference Include="CookComputing.XmlRpcV2, Version=3.0.0.0, Culture=neutral, PublicKeyToken=a7d6e17aa302004d, processorArchitecture=MSIL">
<HintPath>..\packages\xmlrpcnet.3.0.0.266\lib\net20\CookComputing.XmlRpcV2.dll</HintPath>
</Reference>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
Expand All @@ -43,10 +43,12 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="IWordPressClient.cs" />
<Compile Include="IWordPressProxy.cs" />
<Compile Include="Models\Comment.cs" />
<Compile Include="Models\CommentFilter.cs" />
<Compile Include="Models\PostCommentCount.cs" />
<Compile Include="Models\UploadItem.cs" />
<Compile Include="Models\UserRole.cs" />
<Compile Include="Models\UserFilter.cs" />
<Compile Include="Models\CustomFields.cs" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace POSSIBLE.WordPress.XmlRpcClient
/// <summary>
/// A client class responsible for returning data from a WordPress instance over XML-RPC
/// </summary>
public class WordPressXmlRpcClient : IDisposable
public class WordPressXmlRpcClient : IDisposable, IWordPressClient
{
protected string BaseUrl;
protected string Username;
Expand Down
2 changes: 1 addition & 1 deletion src/POSSIBLE.Wordpress.TestHarness/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ private static void WriteMediaItems(IEnumerable<MediaItem> images)
Console.WriteLine(image.metadata.height);
Console.WriteLine(image.metadata.width);

WriteMediaItemSizes(image.metadata.sizes);
// WriteMediaItemSizes(image.metadata.sizes);
Console.WriteLine("-------------------------");
}
}
Expand Down