WordPressUniversal – a PCL library for WordPress based C# mobile apps

WP_CSharp_Lib

As I have already developed a news reader app for my blog, I got asked quite a few times if I want to share my code to help others creating their apps. As I need to redesign my blog reader to match the latest OS features of Windows and Windows Phone, I decided to create my WordPressUniversal library.

Automattic, the company behind WordPress, integrated a powerful JSON API into their JetPack plugin. My library is based on this API. Please make sure the JSON API is active on the blog you are developing your app for.

The library currently provides the following features:

  • getting a list posts or pages
  • getting a list of all categories
  • getting a list of comments for the site and single posts
  • supports Windows Phone 8 & 8.1 Silverlight, Windows Phone 8.1 RT, Windows 8, Xamarin.iOS and Xamarin.Android

The library deserializes all data into C# objects you can immediately work with.

It is still a work in progress, but as it provides already a bunch of options to get you started, I am making this public already.

I am constantly working on the library, so be sure to follow the project along.

Note: JetPack’s JSON API does not support guest commenting at the moment. I already reached out to Automattic to (hopefully) find a solution for this. If you cannot wait, Disqus has a portable solution for Windows Phone apps.

Please make sure to see the documentation on my GitHub page.

If you have any questions, idea, wishes for me, just post a comment here or ping on Twitter.

Happy coding everyone!



   17 Comments


  1. Thomas
      September 6, 2014

    Thanks so much, I was already planning on doing the same thing. Looking forward to trying that out!

    • msicc
        September 6, 2014

      Feel free to contribute to the project 🙂

      • Thomas
          September 16, 2014

        Will do! Have you thought about creating a whole framework app (a Univeral app?) around the pcl to quickly get people starting?
        Also are you planning on adding login / commenting for registered users to the pcl?
        Cheers

        • msicc
            September 17, 2014

          I am considering an Universal App template, but that needs some time. Commebting for registered and logged in users is also my list, as well as to find a solution for guest commenting.

          • Altin Selimi (@AltinSelimi)
              June 22, 2015

            Any news regarding this. I would really be grateful if you could give us a simple template. Windows runtime if possible 🙂

            Best Regards.

          • msicc
              June 23, 2015

            like I said already at Facebook, it is delayed due to some changes in my life that have a time impact. If you have questions in using the library, feel free to ask. 🙂

  2. Matteo
      September 8, 2014

    I’ve seen the example. You should move the site parameter to the constructor 😉

    • msicc
        September 8, 2014

      You mean declare it only once for the project? I made the documentation this way to make it more understandable (as I got feedback it isn’t before)…

      • Matteo Contrini
          September 8, 2014

        I don’t see much sense in having to specify the domain each and every time you make a request…

        • msicc
            September 9, 2014

          I understand your concerns. I will look into it.

  3. Adam
      September 12, 2014

    This blog post will be featured on the Xamarin Weekly Newsletter Issue #5, delivered on Friday September 12.

    • msicc
        September 12, 2014

      thanks a lot, Adam

  4. Marco
      November 26, 2016

    Hi @msicc

    Is it possible to use this PCL in Xamarin.Forms for Android and iOS?

    • msicc
        November 27, 2016

      Hi. It should be, yes.

      • Marco
          November 27, 2016

        Thanks.

        How can I pm you or do you have a business web address, Is it possible to do some business?

Join the discussion right now!