From: OHASHI, Norikazu Date: Thu, 29 Apr 2021 03:08:41 +0000 (+0900) Subject: openBD 以外の利用しているAPIの説明を記述、 評価の表示ロジックを変更 X-Git-Url: http://www.wald-der-katze.sakura.ne.jp/git/gitweb.cgi?a=commitdiff_plain;h=470c83d7ceb7671587bd63aa9b0380692ba77253;p=book_server.git openBD 以外の利用しているAPIの説明を記述、 評価の表示ロジックを変更 --- diff --git a/.markdownlint.json b/.markdownlint.json new file mode 100644 index 0000000..f2a375a --- /dev/null +++ b/.markdownlint.json @@ -0,0 +1,3 @@ +{ + "MD024": false +} diff --git a/readme.md b/readme.md index 9aa919f..74c0b29 100644 --- a/readme.md +++ b/readme.md @@ -126,3 +126,23 @@ * 書誌情報の取得: `/get?isbn=ISBN,ISBN` * 収録範囲の取得: `/coverage` * JSONスキーマの取得: `/schema` + +### 国立国会図書館サーチ + +#### 参照URI + +[国立国会図書館サーチ](https://iss.ndl.go.jp/information/outline/) + +#### API仕様 + +[API仕様の概要](https://iss.ndl.go.jp/information/api/riyou/) + +### GoogleBooks + +#### 参照URI + +[Google Books APIs](https://developers.google.com/books) + +#### API仕様 + +* 書籍の探索: `GET https://www.googleapis.com/books/v1/volumes?q={search terms}` diff --git a/sinatra/app/views/book_info.haml b/sinatra/app/views/book_info.haml index d2a2dab..a5dafd8 100644 --- a/sinatra/app/views/book_info.haml +++ b/sinatra/app/views/book_info.haml @@ -87,25 +87,7 @@ %th 評価 %td - - case book_info[:book_rank] - - when 0 then - .rank - ☆ ☆ ☆ ☆ ☆ - - when 1 then - .rank - ★ ☆ ☆ ☆ ☆ - - when 2 then - .rank - ★ ★ ☆ ☆ ☆ - - when 3 then - .rank - ★ ★ ★ ☆ ☆ - - when 4 then - .rank - ★ ★ ★ ★ ☆ - - when 5 then - .rank - ★ ★ ★ ★ ★ + #{"★"*book_info[:book_rank]+"☆"*(5-book_info[:book_rank])} .buttons %input{ :type => 'button', :class=>"push_button", :onclick =>"location.href='/book_edit/#{book_info[:isbn]}'", :value => '編集' } %input{ :type => 'button', :class=>"push_button", :onclick =>"location.href='/book_list/fromInfo'", :value => '一覧へ' } diff --git a/sinatra/app/views/book_regist.haml b/sinatra/app/views/book_regist.haml index a99e3f9..bc3edec 100644 --- a/sinatra/app/views/book_regist.haml +++ b/sinatra/app/views/book_regist.haml @@ -21,7 +21,7 @@ 「ISBN探索」を押下すると、該当する本の情報が取得できます。 .message - 画層ファイルを指定して、「書影Upload」を押下すると、本の書影を登録できます。 + 画像ファイルを指定して、「書影Upload」を押下すると、本の書影を登録できます。 - if warning .warning @@ -108,7 +108,7 @@ %span 書影: %input{ :name => 'cover_file', :type => 'file', :id => 'cover_file', :accept => 'image/png, image/jpeg', :style => "display:none"} - %input{ :type => 'text', :class => 'input_text', :id => 'file_name', :value => ''} +p %input{ :type => 'text', :class => 'input_text', :id => 'file_name', :value => ''} %input{ :type => 'submit', :class => 'side_button', :value => '書影Upload', :formaction => '/book_upload_cover' } :javascript var file = document.getElementById( 'cover_file' );