You are here: Documentation » SimplePie Live! » Requirements and Getting Started
Differences
This shows you the differences between two versions of the page.
live:setup:start [2013/06/19 04:51] gamegautruc old revision restored |
live:setup:start [2013/08/11 04:50] (current) rmccue old revision restored |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | Sau đây [[http://gamealo.net/avatar/game-avatar-210|Game Avatar 210]] xin chia sẻ những kinh nghiệm đầy thú vị và hữu ích trong game avatar. Vượt mê cung trong Avatar.Để giải cứu Công chúa Ai Cập các bạn cần phải vượt qua mê cung nhiều cửa ải, nhiều nguy hiểm và khó khăn, chỉ sơ sẩy là sẽ bị biến thành xác ướp. Bước đầu tiên, bạn đi mua vé vào Kim Tự Tháp ở Sa mạc, và sức khỏe phải đạt 100 nhé. Bước 1: Các bạn vào Mê cung thì đi thẳng bên phải.Bước 2: Tiếp theo đi thẳng bên phải.Bước 3: Đi xuống dưới. Bước 4: Đi bên phải, bạn phải chạy thật nhanh trong mê cung để không bị biến thành xác ướp thì mới tiếp tục bước tiếp theo. Bước 5: Đi lên trên (để vào được cửa này các bạn phải là người, nếu là xác ướp sẽ không vào được).Bước 6: Sau khi đi qua cửa của bước 5, các bạn sẽ thấy 3 cửa nữa, các bạn chon cửa thứ 1 (tính từ trái sang phải). Bước 7: Sẽ có 3 cửa nữa, các bạn chon cửa thứ 3.Bước 8: Ở đây sẽ 3 cửa, các bạn chọn cửa 1 nhé. Chú ý là ở đây có NPC Xác ướp vô cùng hung tợn để canh cổng.Bước 9: Sau khi qua được cửa ở bước 8, các bạn sẽ gặp đc NPC Công chúa vô cùng xinh đẹp. Để trả công cứu mình, Công chúa sẽ tặng bạn duy nhất một Item ngẫu nhiên như: Vương miện, quần áo Pharaoh coplay (30 ngày)… Bước 10: Các bạn sẽ tự độg bị diss ra chỗ NPC pharaoh ở Sa mac, mở rương đồ các bạn sẽ thấy Công chúa Ai Cập đã cho mình món quà gì. Chúc các bạn chơi [[http://gamealo.net/avatar/game-avatar-210|Game Avatar 210]] vui vẻ! | + | ====== Requirements and Getting Started ====== |
+ | This section contains the first steps for getting started with SimplePie Live! Ready to get started? | ||
+ | ===== Requirements ===== | ||
+ | - A fundamental understanding of JavaScript is required, and an understanding of //JavaScript Object Notation// (aka [[http://json.org/js.html|JSON]]) is highly recommended. | ||
+ | - It would also be valuable to know how to generate HTML via JavaScript using DOM manipulation methods (so that you can dynamically add the feeds to your pages). | ||
+ | - Lastly, it would be valuable for you to have the latest version of [[http://getfirefox.com|Firefox]] installed along with the [[http://getfirebug.com|Firebug]] extension. Firebug is **the best** JavaScript debugging tool on the face of the entire planet... and it's easy to use. Even if you're a hard-core user of another browser, you should still install this combination of tools to that you can more easily dig through the data. | ||
+ | |||
+ | ===== Web Browsers ===== | ||
+ | Because SimplePie Live simply returns a JSON object of data, it is generally expected to work in ANY modern web browser. However, as we move forward, we will be following Yahoo's [[http://developer.yahoo.com/yui/articles/gbs/|Graded Browser Support]] in supporting A-grade web browsers. | ||
+ | |||
+ | Older versions of these browsers may also work as well, but we're pretty sure that these versions DO. In truth, you're more likely to be restricted by the minimum requirements of any JavaScript Framework than you are by SimplePie Live! | ||
+ | |||
+ | ===== Getting Started ===== | ||
+ | SimplePie Live doesn't require you to download any packages or configure any installs. It pulls straight from our servers and runs entirely within your web browser. That being said, there are two steps: | ||
+ | |||
+ | ==== Step 1: Load the base library ==== | ||
+ | First, you need to load the ''base.js'' file from the server by adding it to the ''<head>'' section of your page. | ||
+ | <code html><script type="text/javascript" src="http://live.simplepie.org/app/0.5/base.js"></script></code> | ||
+ | This file is less than 1k and includes the base functionality for requesting feeds and handling callbacks. Besides gzipping it (to make it super small), we've also resisted the temptation to add non-critical code to it, so this file should always remain very small (our goal is to always stay at or below 1k). | ||
+ | |||
+ | ==== Step 2: Call the function ==== | ||
+ | Secondly, you can request a feed and define callback functions for successful and failed requests. If you've ever worked with a modern JavaScript framework like [[http://prototypejs.org|Prototype]], [[http://jquery.com|jQuery]], or [[http://mootools.net|MooTools]] this will look pretty familiar. I should also note that you don't need to use one of these frameworks to use SimplePie Live -- you're free to use plain ol' JavaScript if you want. | ||
+ | <code html> | ||
+ | var feed = new SimplePie(feedUrl, jsonOptions); | ||
+ | </code> | ||
+ | Or, if you're looking for a more realistic example: | ||
+ | <code javascript> | ||
+ | var feed = new SimplePie('http://feeds.feedburner.com/simplepie', { | ||
+ | |||
+ | // Set one configuration option | ||
+ | setTimeout: 30, | ||
+ | |||
+ | // Set up a handler for a successful response | ||
+ | onSuccess: function(feed) { | ||
+ | alert(feed.title.toUpperCase() + "\n" + feed.description); | ||
+ | }, | ||
+ | |||
+ | // Do this if we encounter an error | ||
+ | onFailure: function(feed) { | ||
+ | alert(feed.error); | ||
+ | } | ||
+ | }); | ||
+ | </code> | ||
+ | |||
+ | That's basically the gist of it. If you need help on what configuration options are available, or what properties are available in the API, check out [[live:reference:start]]. |
live/setup/start.txt · Last modified: 2013/08/11 04:50 by rmccue