Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 838155
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T05:15:25+00:00 2026-05-15T05:15:25+00:00

I was wondering if someone could do me massive favour.. I really don’t understand

  • 0

I was wondering if someone could do me massive favour..

I really don’t understand how to make use of APIs – so I was wondering if, using Basecamp as an example, someone could talk me though the basics.

So far I have an application with a dashboard controller/view, I have put basecamp.rb into my /lib directory, added the following to my application_controller:

  def basecamp_connect
    Basecamp.establish_connection!('XXXXXX.basecamphq.com', 'USER', 'PASS', false)
    @basecamp = Basecamp.new
  end

Obviously changing the required parts to my credentials.

Next up I have added the following to my dashboard_controller:

  def index
    Basecamp::TodoList.find(:all)
  end

Next I presume I have to somehow list the Todos on the dashboard using some sort of loop.

Am I doing the right thing, if so – how on earth do I display all the todo items and if not – what am I doing wrong/missing.

It doesn’t have to be todos, anything from Basecamp or any other popular API service would be a good start. It’s just that I happen to have a basecamp account!

Thanks,

Danny

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T05:15:25+00:00Added an answer on May 15, 2026 at 5:15 am

    Your view expects to have some variables defined. You can loop through those variables and display their content as you want.

    So you could do, in your action :

    def index
        @list = Basecamp::TodoList.find(:all)
    end
    

    Then in your view you have access to the @list variable and you can to the following :

    <ul>
        <% @list.each do |item| %>
            <li><%= item.to_json</li>
        <% end %>
    </ul>
    

    Replacing the json dump by the elements as you wish to display them of course.

    You might want to read the rails guides to get a lot more of informations.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I was wondering if someone could provide me with an example of using setStyle
I was wondering if someone could post an example using PyPNG to read a
I was wondering if someone could explain to me how to make a simple
I was wondering if someone could help with an example criteria for nhibernate. I
I'm just wondering if someone could point out why one should use jQuery event
I was wondering if someone could help me out. I am using cakePHP 1.3
Wondering if someone could point me in right direction using bash shell scripting and
Just wondering if someone could tell me the best way to make a gallery
I was wondering if someone could help me using the JQuery validation plugin. I
I was wondering if someone could explain how to use will_paginate on an array

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.