Skip to content

Commit

Permalink
Fix : fix some apiService according to new api doc and delete and rep…
Browse files Browse the repository at this point in the history
…lace some files
  • Loading branch information
ksh-g001 committed Aug 6, 2024
1 parent c9a8270 commit b529b1b
Show file tree
Hide file tree
Showing 55 changed files with 652 additions and 332 deletions.
14 changes: 10 additions & 4 deletions android/HowAboutTrip/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,22 +18,28 @@
android:supportsRtl="true"
android:theme="@style/Base.Theme.HowAboutTrip"
tools:targetApi="31">
<activity
android:name=".view.activity.record.LocationMapActivity"
android:exported="false" />
<activity
android:name=".view.activity.record.BillListActivity"
android:exported="false" />
<activity
android:name=".view.activity.mypage.ExchangeRateActivity"
android:exported="false"
android:screenOrientation="portrait"/>
android:screenOrientation="portrait" />
<activity
android:name=".view.activity.mypage.WeatherActivity"
android:exported="false"
android:screenOrientation="portrait"/>
android:screenOrientation="portrait" />
<activity
android:name=".view.activity.mypage.LikeActivity"
android:exported="false"
android:screenOrientation="portrait"/>
android:screenOrientation="portrait" />
<activity
android:name=".view.activity.ticket.OneWayAirplaneListActivity"
android:exported="false"
android:screenOrientation="portrait"/>
android:screenOrientation="portrait" />
<activity
android:name=".view.activity.ticket.RoundTripAirplaneListActivity"
android:exported="false"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
package com.project.how.adapter.recyclerview.record

import android.view.ViewGroup
import androidx.recyclerview.widget.RecyclerView
import com.project.how.databinding.BillListItemBinding

class BillListAdapter (

) : RecyclerView.Adapter<BillListAdapter.ViewHolder>(){
inner class ViewHolder(val binding: BillListItemBinding) : RecyclerView.ViewHolder(binding.root){
fun bind(data : ){

}
}

override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder {
TODO("Not yet implemented")
}

override fun getItemCount(): Int {
TODO("Not yet implemented")
}

override fun onBindViewHolder(holder: ViewHolder, position: Int) {
TODO("Not yet implemented")
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import android.view.View
import android.view.ViewGroup
import androidx.recyclerview.widget.RecyclerView
import com.project.how.R
import com.project.how.data_class.recyclerview.AiDaysSchedule
import com.project.how.data_class.recyclerview.schedule.AiDaysSchedule
import com.project.how.databinding.AiDaysScheduleItemBinding

class AiDaysScheduleAdapter(private val context: Context, data: List<AiDaysSchedule>)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import com.bumptech.glide.Glide
import com.google.android.material.tabs.TabLayout
import com.project.how.BuildConfig
import com.project.how.R
import com.project.how.data_class.recyclerview.AiSchedule
import com.project.how.data_class.recyclerview.schedule.AiSchedule
import com.project.how.databinding.AiScheduleItemBinding
import com.project.how.view.dialog.AiScheduleDialog
import com.project.how.view.dp.DpPxChanger
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import android.view.View
import android.view.ViewGroup
import androidx.recyclerview.widget.RecyclerView
import com.project.how.R
import com.project.how.data_class.recyclerview.DaysSchedule
import com.project.how.data_class.recyclerview.schedule.DaysSchedule
import com.project.how.databinding.CalendarDaysScheduleItemBinding
import java.text.NumberFormat
import java.util.Locale
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import android.widget.Toast
import androidx.appcompat.widget.PopupMenu
import androidx.recyclerview.widget.RecyclerView
import com.project.how.R
import com.project.how.data_class.recyclerview.DaysSchedule
import com.project.how.data_class.recyclerview.schedule.DaysSchedule
import com.project.how.databinding.CalendarDaysScheduleEditItemBinding
import com.project.how.interface_af.interface_ada.ItemMoveListener
import com.project.how.interface_af.interface_ada.ItemStartDragListener
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ import android.view.ViewGroup
import androidx.recyclerview.widget.RecyclerView
import com.bumptech.glide.Glide
import com.project.how.BuildConfig
import com.project.how.R
import com.project.how.data_class.recyclerview.EventViewPager
import com.project.how.data_class.recyclerview.schedule.EventViewPager
import com.project.how.databinding.ViewpagerRoundTicketEventBinding

class EventTicketViewPagerAdapter(eventInfo : List<EventViewPager>)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ import android.view.ViewGroup
import androidx.recyclerview.widget.RecyclerView
import com.bumptech.glide.Glide
import com.project.how.BuildConfig
import com.project.how.R
import com.project.how.data_class.recyclerview.EventViewPager
import com.project.how.data_class.recyclerview.schedule.EventViewPager
import com.project.how.databinding.ViewpagerRoundEventBinding

class EventViewPagerAdapter(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.project.how.adapter.recyclerview.record
package com.project.how.adapter.recyclerview.viewpager

import android.view.LayoutInflater
import android.view.ViewGroup
Expand All @@ -17,15 +17,17 @@ class RecentAddedRecordsAdapter(
fun bind(data : RecentAddedRecord){
binding.titleDate.text = if (data.endDate == null) "${data.startDate}\n${data.title}" else "${data.startDate}\n${data.endDate}\n${data.title}"

Glide.with(binding.root)
.load(data.image)
.error(BuildConfig.ERROR_IMAGE_URl)
.into(binding.firstImage)

Glide.with(binding.root)
.load(data.countryImage)
.error(BuildConfig.ERROR_IMAGE_URl)
.into(binding.secondImage)
if (!data.image.isNullOrBlank() && !data.countryImage.isNullOrBlank()){
Glide.with(binding.root)
.load(data.image)
.error(BuildConfig.ERROR_IMAGE_URl)
.into(binding.firstImage)

Glide.with(binding.root)
.load(data.countryImage)
.error(BuildConfig.ERROR_IMAGE_URl)
.into(binding.secondImage)
}
}
}

Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ data class RecentAddedRecord(
val id : Long,
val startDate : String,
val endDate : String?,
val countryImage : String,
val image : String,
val countryImage : String?,
val image : String?,
val title : String
)

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.project.how.data_class.recyclerview
package com.project.how.data_class.recyclerview.schedule

import java.io.Serializable

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.project.how.data_class.recyclerview
package com.project.how.data_class.recyclerview.schedule

data class EventViewPager(
val url : String,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.project.how.data_class.recyclerview
package com.project.how.data_class.recyclerview.schedule

import java.io.Serializable

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.project.how.interface_af

import com.project.how.data_class.recyclerview.DaysSchedule
import com.project.how.data_class.recyclerview.schedule.DaysSchedule

interface OnDateTimeListener {
fun onSaveDate(d: DaysSchedule, selectedDate: String, changedDate: String, position: Int)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.project.how.interface_af

import com.project.how.data_class.recyclerview.DaysSchedule
import com.project.how.data_class.recyclerview.schedule.DaysSchedule

interface OnScheduleListener {
fun onDaysScheduleListener(schedule : DaysSchedule, position : Int)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.project.how.interface_af.interface_ada

import com.project.how.data_class.recyclerview.DaysSchedule
import com.project.how.data_class.recyclerview.schedule.DaysSchedule

interface ItemStartDragListener {
fun onDropActivity(initList : MutableList<DaysSchedule>, changeList: MutableList<DaysSchedule>)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package com.project.how.model

import androidx.lifecycle.LiveData
import androidx.lifecycle.MutableLiveData
import com.project.how.data_class.recyclerview.AiSchedule
import com.project.how.data_class.recyclerview.schedule.AiSchedule

class AiScheduleRepository {
private val _aiScheduleLiveData = MutableLiveData<AiSchedule>()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ import com.project.how.adapter.recyclerview.schedule.AiDaysScheduleAdapter
import com.project.how.data_class.dto.schedule.CheckList
import com.project.how.data_class.dto.schedule.GetFastestSchedulesResponse
import com.project.how.data_class.dto.schedule.GetLatestSchedulesResponse
import com.project.how.data_class.recyclerview.AiDaysSchedule
import com.project.how.data_class.recyclerview.AiSchedule
import com.project.how.data_class.recyclerview.DaysSchedule
import com.project.how.data_class.recyclerview.Schedule
import com.project.how.data_class.recyclerview.schedule.AiDaysSchedule
import com.project.how.data_class.recyclerview.schedule.AiSchedule
import com.project.how.data_class.recyclerview.schedule.DaysSchedule
import com.project.how.data_class.recyclerview.schedule.Schedule
import com.project.how.data_class.dto.schedule.GetScheduleListResponse
import com.project.how.data_class.dto.schedule.ScheduleDetail
import kotlinx.coroutines.flow.Flow
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,25 +13,21 @@ import retrofit2.http.POST

interface CountryService {

@Headers("No-Authorization: true")
@POST("countries/locations")
fun getCountryLocation(
@Body country : GetCountryInfoRequest
) : Call<GetCountryLocationResponse>

@Headers("No-Authorization: true")
@POST("countries/weather/current")
fun getCurrentWeather(
@Body country: GetCountryInfoRequest
) : Call<GetCurrentWeatherResponse>

@Headers("No-Authorization: true")
@POST("countries/weather/weekly")
fun getWeeklyWeather(
@Body country: GetCountryInfoRequest
) : Call<GetWeeklyWeathersResponse>

@Headers("No-Authorization: true")
@GET("countries/exchange-rates")
fun getAllExchangeRates() : Call<GetAllExchangeRatesResponse>
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import retrofit2.http.Query

interface ScheduleService {

@Headers("No-Authorization: true")
@POST("gpt/schedules")
fun createScheduleList(
@Body createCondition: CreateScheduleListRequest
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import com.project.how.databinding.ActivityMainBinding
import com.project.how.view.activity.ai.AddAICalendarActivity
import com.project.how.view.fragment.main.CalendarFragment
import com.project.how.view.fragment.main.MypageFragment
import com.project.how.view.fragment.main.PictureFragment
import com.project.how.view.fragment.main.RecordFragment
import com.project.how.view.fragment.main.TicketFragment
import dagger.hilt.android.AndroidEntryPoint

Expand Down Expand Up @@ -38,7 +38,7 @@ class MainActivity : AppCompatActivity() {
.commitAllowingStateLoss()
}
R.id.menu_picture->{
supportFragmentManager.beginTransaction().replace(R.id.fragment, PictureFragment())
supportFragmentManager.beginTransaction().replace(R.id.fragment, RecordFragment())
.commitAllowingStateLoss()
}
R.id.menu_mypage->{
Expand Down
Loading

0 comments on commit b529b1b

Please sign in to comment.