Timothy,

Attached to this email you will find a copy of a NUnit TextFixture
that worked fine for me. Anyway, I do believe the error you've got
back is related to your allowance on the net (you've got not the
rights to open a trust connection to the webservice, Deveel.Delicious
is just a "bridge", it doesn't handle much of net-logic). You could
try to specify a proxy.

Cheers.
Antonello



On 4/27/07, Timothy Parez <[EMAIL PROTECTED]> wrote:
Hi,

I checked out the current SVN and tried the following
// project created on 4/27/2007 at 8:25 AM

using System;
using Deveel.Delicious;
namespace DelTest
{
        class MainClass
        {
                public static void Main(string[] args)
                {
                        DeliciousClient client = new
DeliciousClient("myusernamehere","myverysecretpass");
                        Console.ReadLine();
                        DeliciousPostCollection posts = client.GetAllPosts();

                        foreach(DeliciousPost post in posts)
                        {
                                Console.WriteLine("{0}\n
\t{1}",post.Description,post.Url.ToString());
                        }
                        Console.ReadLine();
                        Console.WriteLine("done");
                }
        }
}

I get the following:
Unhandled Exception: Deveel.Delicious.DeliciousClientException: Error
getting response stream (Trust failure): TrustFailure
  at Deveel.Delicious.DeliciousClient.GetAllPosts (System.String tag)
[0x00000]
  at Deveel.Delicious.DeliciousClient.GetAllPosts () [0x00000]
  at DelTest.MainClass.Main (System.String[] args) [0x00016]
in /home/timothy/sources/delicious/DelTest/DelTest/Main.cs:12

but my username/password configuration is correct, unless I need to
specify it in a different way ?

Looking forward to using this library !! :)

Timothy.

_______________________________________________
Mono-list maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-list

using System;
using NUnit.Framework;

namespace Deveel.Delicious {
        [TestFixture]
        public sealed class DeliciousTest {
                [SetUp]
                public void SetUp() {
                        client = new DeliciousClient("yourusername", 
"yourpassword");
                }

                private DeliciousClient client;

                [Test]
                public void TestDeveelPost() {
                        DeliciousPost post = new 
DeliciousPost("http://www.deveel.com";, "The Deveel website.");
                        post.Time = DateTime.Now;
                        post.AddTag("development");
                        post.AddTag("open-source");
                        post.AddTag("c#");
                        post.AddTag("mono");

                        client.AddPost(post);
                }

                [Test]
                public void TestMinossePost() {
                        DeliciousPost post = new 
DeliciousPost("http://minosse.deveel.com";, "The project Minosse RDBMS.");
                        post.Time = DateTime.Now;
                        post.AddTag("development");
                        post.AddTag("database");
                        post.AddTag("sql");
                        post.AddTag("open-source");
                        post.AddTag("c#");
                        post.AddTag("mono");

                        client.AddPost(post);
                }

                [Test]
                public void TestMonoPost() {
                        DeliciousPost post = new 
DeliciousPost("http://www.mono-project.com";, "The project Mono: open-source 
port of .NET.");
                        post.Time = DateTime.Now;
                        post.AddTag("development");
                        post.AddTag("open-source");
                        post.AddTag("c#");
                        post.AddTag("mono");
                        post.AddTag(".net");
                        post.AddTag("novell");

                        client.AddPost(post);
                }

                [Test]
                public void TestReplaceMonoPost() {
                        DeliciousPost post = new 
DeliciousPost("http://www.mono-project.com";, "The project Mono: open-source 
port of .NET.");
                        post.Time = DateTime.Now;
                        post.AddTag("development");
                        post.AddTag("open-source");
                        post.AddTag("c#");
                        post.AddTag("mono");
                        post.AddTag(".net");
                        post.AddTag("novell");
                        post.IsShared = true;

                        client.AddPost(post, true);
                }

                [Test]
                public void TestAllPosts() {
                        TestDeveelPost();
                        TestMinossePost();
                        TestMonoPost();
                }

                [Test]
                public void TestGetAllPosts() {
                        DeliciousPostCollection posts = client.GetAllPosts();
                        foreach (DeliciousPost post in posts) {
                                Console.WriteLine("URL:         {0}", post.Url);
                                Console.WriteLine("Description: {0}", 
post.Description);
                                Console.WriteLine("Tags:        {0}", 
post.TagString);
                                Console.WriteLine("Shared:      {0}", 
post.IsShared);
                                Console.WriteLine("----------------");
                        }
                }

                [Test]
                public void TestSetBundle() {
                        DeliciousBundle bundle = new DeliciousBundle("dev", new 
string[] { "mono", ".net", "minosse" } );

                        client.SetBundle(bundle);
                }

                [Test]
                public void TestRemovePostBacked() {
                        Console.WriteLine("Before modification: ");
                        Console.WriteLine("================");
                        Console.WriteLine();

                        TestGetAllPosts();

                        DeliciousPostCollection posts = client.GetAllPosts();
                        posts.Remove("http://www.mono-project.com";);

                        Console.WriteLine("After modification: ");
                        Console.WriteLine("================");
                        Console.WriteLine();

                        TestGetAllPosts();
                }
        }
}
_______________________________________________
Mono-list maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-list

Reply via email to